calfw capture: use nth for date extraction (avoid calendar-extract dependency)
This commit is contained in:
@@ -1617,10 +1617,11 @@ Formats matching what org-caldav/ox-icalendar export correctly:
|
|||||||
- Timed single day: <2026-02-26 Thu 14:00-15:30>
|
- Timed single day: <2026-02-26 Thu 14:00-15:30>
|
||||||
- All-day multi: <2026-02-26 Thu>--<2026-02-28 Sat>
|
- 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>"
|
- 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)))
|
(let* ((date (or my/calfw-capture-date (calendar-current-date)))
|
||||||
(y (calendar-extract-year date))
|
(m (nth 0 date))
|
||||||
(m (calendar-extract-month date))
|
(d (nth 1 date))
|
||||||
(d (calendar-extract-day date))
|
(y (nth 2 date))
|
||||||
(dow (calendar-day-name date nil t))
|
(dow (calendar-day-name date nil t))
|
||||||
(start-time (read-string "Start time (HH:MM, empty=all-day): "))
|
(start-time (read-string "Start time (HH:MM, empty=all-day): "))
|
||||||
(end-input (unless (string-empty-p start-time)
|
(end-input (unless (string-empty-p start-time)
|
||||||
|
|||||||
Reference in New Issue
Block a user