Re: A structured format for dates?

On Thu, Jun 16, 2022 at 04:04:52PM +1000, Mark Nottingham wrote:
> Personally, I tend to agree with PHK - I think that Integer (or Decimal) is
> adquate and appropriate.

+1 for me!

> However, some people seem to keep on pushing back on this - I think
> especially for application-focused headers it's more visible. If we're going
> to do something, retrofit is a good opportunity for it, since we're defining
> SF-Date and friends.

The thing is, the effort to present *any* human-readable string is always
worse than converting an integer (or decimal) to the final representation,
since it's required to pass through such an integer-based representation
at one point during the operation anyway.

The epoch-based representation also has the benefit that you're not required
to have to guess a timezone nor to be confused by ":60" resulting from a leap
second once every few years.

Also, applications that want to rely on text-based dates do not all agree
on the format. Some would like to see the day-of-week there, others don't
want ISO8601 because it's less readable by humans etc. Thus I'd rather go
for integer+fraction only.

Cheers,
Willy

Received on Thursday, 16 June 2022 06:22:28 UTC