View Issue Details

IDProjectCategoryView StatusLast Update
00019041003.1(2024)/Issue8Base Definitions and Headerspublic2025-02-21 16:32
Reportermirabilos Assigned To 
PrioritynormalSeverityCommentTypeClarification Requested
Status NewResolutionOpen 
Namemirabilos
Organization
User Reference
Section7.3.5
Page Number154
Line Number5270
Interp Status---
Final Accepted Text
Summary0001904: LC_TIME era start_date (and end_date) possibly mis-specified
DescriptionI 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 ActionIdeally, 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.
TagsNo tags attached.

Activities

mirabilos

2025-02-03 04:44

reporter   bugnote:0007061

(and ignore the - in my example in the two %-Ey uses, that’s a glibc extension to remove the normally-automatic zero padding so the year 1 CE doesn’t become 01 CE; my locale file documents it as extension so the user can remove it if they don’t have it)

geoffclare

2025-02-04 10:36

manager   bugnote:0007063

Moving from Online Pubs to the Issue 8 project, as this is a problem with the standard itself, not specific to the HTML translation.

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
2025-02-03 04:44 mirabilos Note Added: 0007061
2025-02-04 10:34 geoffclare Project Online Pubs => 1003.1(2024)/Issue8
2025-02-04 10:36 geoffclare Page Number => 154
2025-02-04 10:36 geoffclare Line Number => 5270
2025-02-04 10:36 geoffclare Interp Status => ---
2025-02-04 10:36 geoffclare Note Added: 0007063
2025-02-21 16:32 agadmin Category Base Definitions => Base Definitions and Headers