From 30cf2bfe06d443da1ff41ab9bddc4bd6a431aa5f Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 17 Feb 2026 00:11:52 -0600 Subject: Fix time comparison bugs in chime--time= and chime--timestamp-within-interval-p chime--time= was using %d:%H:%M (day-of-month only), causing false matches across different months/years. Now uses %Y-%m-%d %H:%M for full date comparison. chime--timestamp-within-interval-p now accepts numeric timestamps (integer/float) in addition to lists. --- chime.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chime.el') diff --git a/chime.el b/chime.el index 08c9632..6e89aa9 100644 --- a/chime.el +++ b/chime.el @@ -606,7 +606,7 @@ for org-agenda-files to be populated)." Comparison is performed by converted each element of LIST onto string in order to ignore seconds." (->> list - (--map (format-time-string "%d:%H:%M" it)) + (--map (format-time-string "%Y-%m-%d %H:%M" it)) (-uniq) (length) (= 1))) @@ -623,8 +623,8 @@ Returns nil if TIMESTAMP or INTERVAL is invalid." (and timestamp interval (numberp interval) - ;; Validate timestamp is a proper time value (list of integers) - (listp timestamp) + ;; Validate timestamp is a proper time value (accepts list, integer, or float) + (or (listp timestamp) (numberp timestamp)) (chime--time= (time-add (current-time) (seconds-to-time (* 60 interval))) timestamp))) -- cgit v1.2.3