GNU bug report logs - #74869
[PATCH] Add predicates for decoded times and time deltas

Previous Next

Package: emacs;

Reported by: Richard Lawrence <rwl <at> recursewithless.net>

Date: Sat, 14 Dec 2024 16:13:02 UTC

Severity: wishlist

Tags: patch

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: 74869 <at> debbugs.gnu.org
Cc: Richard Lawrence <rwl <at> recursewithless.net>
Subject: bug#74869: Fwd: [PATCH] Add predicates for decoded times and time deltas
Date: Sun, 29 Dec 2024 11:18:33 -0800
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 <at> cs.ucla.edu>
To: Richard Lawrence <rwl <at> recursewithless.net>
CC: 74689 <at> 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.




This bug report was last modified 98 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.