calfw capture: use nth for date extraction (avoid calendar-extract dependency)

This commit is contained in:
2026-02-25 15:58:55 +01:00
parent 2d4b276a67
commit 02ad895dd6

View File

@@ -1617,10 +1617,11 @@ Formats matching what org-caldav/ox-icalendar export correctly:
- Timed single day: <2026-02-26 Thu 14:00-15:30>
- All-day multi: <2026-02-26 Thu>--<2026-02-28 Sat>
- Timed multi-day: <2026-02-26 Thu 15:00>--<2026-02-28 Sat 22:00>"
(require 'calendar)
(let* ((date (or my/calfw-capture-date (calendar-current-date)))
(y (calendar-extract-year date))
(m (calendar-extract-month date))
(d (calendar-extract-day date))
(m (nth 0 date))
(d (nth 1 date))
(y (nth 2 date))
(dow (calendar-day-name date nil t))
(start-time (read-string "Start time (HH:MM, empty=all-day): "))
(end-input (unless (string-empty-p start-time)