* bug#74869: Fwd: [PATCH] Add predicates for decoded times and time deltas
[not found] <468ca0ab-a4aa-41ed-8f6c-260940f3f9f3@cs.ucla.edu>
@ 2024-12-29 19:17 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2024-12-29 19:17 UTC (permalink / raw)
To: 74869; +Cc: Richard Lawrence
Argh, I now see that I cc'ed the wrong bug report. It should be bug
74869, not 74689. Forwarding this two-day-old email to the correct bug
report. Sorry about the duplication.
-------- Forwarded Message --------
Subject: Re: [PATCH] Add predicates for decoded times and time deltas
Date: Fri, 27 Dec 2024 16:44:32 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
To: Richard Lawrence <rwl@recursewithless.net>
CC: 74689@debbugs.gnu.org
What's the use case for these proposed predicates? I'm finding it hard
to review the patch without knowing what it's for.
Surely this should be in time-date.el rather than simple.el.
The implementation of decoded-time-p seems complicated and doesn't match
what decode-time produces. Wouldn't it be simpler to call (ignore-errors
(equal val (decode-time (encode-time val))))?
^ permalink raw reply [flat|nested] 2+ messages in thread
* bug#74869: Fwd: [PATCH] Add predicates for decoded times and time deltas
[not found] <e6537a9d-3f74-46a0-9bbd-ef63d045f4c2@cs.ucla.edu>
@ 2024-12-29 19:18 ` Paul Eggert
0 siblings, 0 replies; 2+ messages in thread
From: Paul Eggert @ 2024-12-29 19:18 UTC (permalink / raw)
To: 74869; +Cc: Richard Lawrence
Forwarding another mis-addressed email of mine.
-------- Forwarded Message --------
Subject: Re: [PATCH] Add predicates for decoded times and time deltas
Date: Sat, 28 Dec 2024 09:26:23 -0800
From: Paul Eggert <eggert@cs.ucla.edu>
To: Richard Lawrence <rwl@recursewithless.net>
CC: 74689@debbugs.gnu.org
On 12/28/24 07:56, Richard Lawrence wrote:
> I need to use
> `calendar-extract-month' with a plain date value, but
> `decoded-time-month' with a date-time value. I need type predicates to
> do such dispatching.
Not necessarily; you can instead try each function in turn and use the
first that works.
I have some qualms about saying that decoded times are a "type". Whether
a decoded time is valid depends on the timezone: (0 30 2 10 3 2024 0 t
-21600) is a valid decoded time in Phoenix but not in Denver, because
clocks sprang forward over that time in Denver but not in Phoenix. When
data interpretation gets that complicated, the Emacs notion of "type" is
not always the best.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-12-29 19:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <e6537a9d-3f74-46a0-9bbd-ef63d045f4c2@cs.ucla.edu>
2024-12-29 19:18 ` bug#74869: Fwd: [PATCH] Add predicates for decoded times and time deltas Paul Eggert
[not found] <468ca0ab-a4aa-41ed-8f6c-260940f3f9f3@cs.ucla.edu>
2024-12-29 19:17 ` Paul Eggert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.