0

If I open calendar and hit p p it shows me —by calling (calendar-persian-print-date)— the Persian date in minibuffer. How can I get Persian date without opening calendar? When I call (calendar-persian-print-date) directly, it says Debugger entered--Lisp error: (void-variable displayed-month).

1 Answer 1

2

You can use C-h f (describe-function)'s "completion" feature to discover function that you don't know yet, e.g., enter calendar-persian in the minibuffer then type TAB, it will show all functions with that prefix.

(calendar-persian-date-string)
     => "Xordad 10, 1396"

(calendar-persian-from-absolute
 (calendar-absolute-from-gregorian
  (calendar-current-date)))
     => (3 10 1396)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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