AbstProcDo · 2022-04-17 09:49
It trigger lunar-phases of 3 months around today when strike "M" in agenda-view.
(org-agenda-phases-of-moon)
Display the phases of the moon for the 3 months around the cursor date.
It usually difficult to figures out where today's phase near. How could display the phases in only 1 months coming.
Phil-Hudson · 2022-04-17 10:40
(require 'lunar)
(require 'calendar)
(defun ph/lunar-phase-name (&optional date)
"Return the human-readable moon phase at DATE.
DATE is a list '(month day year). If DATE is nil, return the human-readable
current moon phase."
(lunar-phase-name (ph/lunar-phase date)))
(defun ph/lunar-phase (&optional date)
"Return the symbolic numerical representation of the moon phase at DATE.
DATE is a list '(month day year). If DATE is nil, return the symbolic
representation of the current moon phase.
Phase representations returned: 0 = new moon, 1 = first quarter, 2 = full moon,
3 = last quarter."
(let* ((effective-date (or date (calendar-current-date)))
(month (calendar-extract-month effective-date))
(year (calendar-extract-year effective-date))
(phase-list (lunar-phase-list month year))
(cur-phase (car phase-list))
(ldate (list effective-date)))
(while (calendar-date-compare (car phase-list) ldate)
(setq cur-phase (pop phase-list)))
(cl-caddr cur-phase)))
AbstProcDo · 2022-04-17 10:53
ty, how could get all the phases of coming one months?
AbstProcDo · 2022-04-17 10:54
There's such a function to show today's month phase as diary-lunar-phases
TelcDunedain · 2022-04-18 01:27
https://unicode-table.com/en/sets/moon/
Because of course.