The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1904 
====================================================================== 
Reported By:                mirabilos
Assigned To:                
====================================================================== 
Project:                    Online Pubs
Issue ID:                   1904
Category:                   Base Definitions
Type:                       Clarification Requested
Severity:                   Comment
Priority:                   normal
Status:                     New
Name:                       mirabilos 
Organization:                
User Reference:              
URL:                       
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_05

Section:                    7.3.5 
====================================================================== 
Date Submitted:             2025-02-03 04:29 UTC
Last Modified:              2025-02-03 04:29 UTC
====================================================================== 
Summary:                    LC_TIME era start_date (and end_date) possibly
mis-specified
Description: 
I played around a bit with getting CE/BCE into era for a locale, and I
stumbled over the spec saying “Years prior to AD¹ 1 shall be represented
as negative numbers.” here.

① AD = CE

This surprised me, as it’s a clear mismatch with struct tm.tm_year, which
uses the proleptic gregorian calendar, and the year preceding 1 is 0, no
discontinuity there. And indeed, on glibc, I had to use the following to
make it work, so libc implementers also do the “obvious” thing instead
of what that little remark in the spec says:

era           "+:1:0001//01//01:+*:CE:%-Ey %EC";/
              "+:1:0000//12//31:-*:BCE:%-Ey %EC"

Desired Action: 
Ideally, someone (more than one, probably) should do a survey of what
implementations do, and someone could see whether this sentence was
deliberately inserted like that, and if there’s no reason to the
contrary, change…

> Years prior to AD 1 shall be represented as negative numbers.

… to…

> The year prior to 1 CE shall be represented as 0, preceding years as
negative numbers.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2025-02-03 04:29 mirabilos      New Issue                                    
2025-02-03 04:29 mirabilos      Name                      => mirabilos       
2025-02-03 04:29 mirabilos      URL                       =>
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap07.html#tag_07_03_05
2025-02-03 04:29 mirabilos      Section                   => 7.3.5           
======================================================================


  • [Online Pubs... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Online... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to