bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1


From: Basil L. Contovounesios
Subject: bug#48298: Invalid time specification: encode-time((0 30 11 1 1 0 nil -1 nil))
Date: Sat, 08 May 2021 23:37:43 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

forcemerge 48290 48298
quit

Евгений Михайлов <lewwadoo@gmail.com> writes:

> (my-mins-between "11:30" "12:04")
>
> (defun my-mins-between (time1 time2)
>   "Return the minutes between HH:mm strings TIME1 and TIME2."
>   (let ((diff (apply #'time-subtract
>                      (mapcar (lambda (time)
>                                (encode-time (decoded-time-set-defaults
>                                              (parse-time-string time))))
>                              (list time1 time2)))))
>     (/ (float-time diff) 60)))
>
> Debugger entered--Lisp error: (error "Invalid time specification")
>   encode-time((0 30 11 1 1 0 nil -1 nil))
>   (lambda (time) (encode-time (decoded-time-set-defaults (parse-time-string 
> time))))("11:30")
>   mapcar((lambda (time) (encode-time (decoded-time-set-defaults 
> (parse-time-string time)))) ("11:30" "12:04"))

I'm not sure what happened that resulted in two bug reports being
submitted, but this looks like the missing description from
https://bugs.gnu.org/48290, so I'm merging the two reports.

Thanks,

-- 
Basil





reply via email to

[Prev in Thread] Current Thread [Next in Thread]