> On 14 Feb 2025, at 16:26, Andrew Josey via austin-group-l at The Open Group 
> <[email protected]> wrote:

> A question came up yesterday in the meeting on bug 1904 and what 
> implementations do.
> 
> 0001904: LC_TIME era start_date (and end_date) possibly mis-specified 
> https://www.austingroupbugs.net/bug_view_page.php?bug_id=1904
> 
> Where the standard says 
> Years prior to AD 1 shall be represented as negative numbers.
> 
> Historically, there was no year 0 and the standard is worded to reflect this 
> fact.  

Astronomical year numbering has a year 0, and does not use the labels AD, BC, 
CE and BCE.
https://en.wikipedia.org/wiki/Astronomical_year_numbering

Also older dates are normally in the Julian Calendar, not the Proleptic 
Gregorian Calendar.

When brushing up some Julian Day Number (JDN) and Julian Date (JD) C++ code I 
wrote, and made a small program for that, I found some interesting aspects that 
in some form might be integrated into the standard, say as a part of the shell:

Integers can be interpreted as JDN, and decimal numbers as JD. For dates, the 
format yyyy-mm-dd refer to the Gregorian Calendar if 1582-10-15 or later, and 
before that, the Julian Calendar; to explicitly specify which calendar, ‘G’ or 
‘J’ is appended. Internally, these dates are represented as JDNs, so date 
differences can be computed with ordinary arithmetic. Incidentally, I admit any 
integers, also positive and negative, for yyyy, mm, dd, as it is easy to 
recompute, and may be useful.

For leap seconds, one might integrate them into the JD, so that it always refer 
to UTC. There is support in C++ for UTC. The leap seconds have effectively been 
deprecated, likely not adding new ones, though not formally abolished.



Reply via email to