Re: New pre-SRFI: Modern date and time library Daphne Preston-Kendal 10 Nov 2024 10:18 UTC

On 10 Nov 2024, at 05:28, Arthur A. Gleckler <xxxxxx@speechcode.com> wrote:

> On Sat, Nov 9, 2024 at 4:56 PM Pierpaolo Bernardi <xxxxxx@gmail.com> wrote:
>   ISO-8601 calls this a "local time", and, of course, defines a syntax
> for it. An example of local time in ISO-8601 syntax is: "21:00"
>
> Yes, of course.  But that's a string representation of a local time.  What does one use internally to represent such a time?  A special time zone that means "where I am?"

ICU4X does have a separate ‘time-of-day’ type. I decided to leave it out because I thought dates independent of time zones are common (as explained in the pre-SRFI), but times independent of time zones not. And I thought a locale-sensitive date and time formatting library could just provide one of its own, if that is the only thing it is useful for.

I could add one, though. That would make a timestamp a tuple of (date × local time × timezone) rather than (date × hour × minute × second × timezone), which seems conceptually cleaner anyway … hmm.

Daphne