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
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)