diff options
| author | Craig Jennings <c@cjennings.net> | 2026-02-17 00:11:52 -0600 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-02-17 00:11:52 -0600 |
| commit | 30cf2bfe06d443da1ff41ab9bddc4bd6a431aa5f (patch) | |
| tree | 85662cdabb06f70801ece0c7b2b77957c5131a8c | |
| parent | 4835fadabf243b33fb78557e45428055675e7300 (diff) | |
| download | chime-30cf2bfe06d443da1ff41ab9bddc4bd6a431aa5f.tar.gz chime-30cf2bfe06d443da1ff41ab9bddc4bd6a431aa5f.zip | |
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.
| -rw-r--r-- | chime.el | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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))) |
