0

I was working away in emacs using org-mode to register some task I was doing, when I noticed a new buffer had appeared called "**dates**". It had a number of dates presented in it such as "ISO date", "Gregorian", "Number of days until the end of the year", etc. Where did that come from?

Alas I had left it too late to use C-h l to see what key combination brought it up. Searching within emacs help system and google is proving futile....

1

For me, grep gives a single answer:

(defun org-agenda-convert-date ()
  (interactive)
  (org-agenda-check-type t 'agenda)
  (let ((day (get-text-property (min (1- (point-max)) (point)) 'day))
        date s)
    (unless day
      (user-error "Don't know which date to convert"))
    (setq date (calendar-gregorian-from-absolute day))
    (setq s (concat
             "Gregorian:  " (calendar-date-string date) "\n"
             "ISO:        " (calendar-iso-date-string date) "\n"
             "Day of Yr:  " (calendar-day-of-year-string date) "\n"
             "Julian:     " (calendar-julian-date-string date) "\n"
             "Astron. JD: " (calendar-astro-date-string date)
             " (Julian date number at noon UTC)\n"
             "Hebrew:     " (calendar-hebrew-date-string date) " (until sunset)\n"
             "Islamic:    " (calendar-islamic-date-string date) " (until sunset)\n"
             "French:     " (calendar-french-date-string date) "\n"
             "Bahá’í:     " (calendar-bahai-date-string date) " (until sunset)\n"
             "Mayan:      " (calendar-mayan-date-string date) "\n"
             "Coptic:     " (calendar-coptic-date-string date) "\n"
             "Ethiopic:   " (calendar-ethiopic-date-string date) "\n"
             "Persian:    " (calendar-persian-date-string date) "\n"
             "Chinese:    " (calendar-chinese-date-string date) "\n"))
    (with-output-to-temp-buffer "*Dates*"
      (princ s))
    (org-fit-window-to-buffer (get-buffer-window "*Dates*"))))
  • That could be it, though I am still unsure how I got there. HeHe "Gregorian" not "Jordan"... – alls0rts Oct 21 at 9:24
  • From Agenda Mode buffer (C-c a a for example) the letter C calls it up. Mystery solved. Thanks. – alls0rts Oct 21 at 9:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.