A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=739 ====================================================================== Reported By: dalias Assigned To: ====================================================================== Project: 1003.1(2013)/Issue7+TC1 Issue ID: 739 Category: System Interfaces Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Rich Felker Organization: musl libc User Reference: Section: strftime Page Number: 2023 Line Number: 64612-64623 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2013-08-23 01:11 UTC Last Modified: 2023-01-26 17:18 UTC ====================================================================== Summary: CX requirements for strftime seem to conflict with ISO C ======================================================================
---------------------------------------------------------------------- (0006141) geoffclare (manager) - 2023-01-26 17:18 https://austingroupbugs.net/view.php?id=739#c6141 ---------------------------------------------------------------------- Change:<blockquote>Equivalent to %[CX]+4[/CX]Y-%m-%d if no flag and no minimum field width are specified.</blockquote>to:<blockquote>Equivalent to %Y-%m-%d if no flag and no minimum field width are specified. (For years between 1000 and 9999 inclusive this provides the ISO 8601:2004 complete representation, extended format date representation of a specific day.)</blockquote> On 2018 edition page 2049 line 65723 section strftime() APPLICATION USAGE, after:<blockquote>These two forms can be produced with the '0' flag and a minimum field width options using the conversions specifications %04Y and %01Y, respectively. </blockquote>add:<blockquote>Similarly, because %Y is part of %F, field widths of 10 and 7 (%010F, %07F), respectively, produce the same effect in the year portion of the %F conversion result.</blockquote> On 2018 edition page 2049 line 65725 section strftime() APPLICATION USAGE, change:<blockquote>For years in the range [0001,9999], POSIX.1-2017 requires that the output produced match the ISO 8601:2004 standard complete representation extended format (YYYY-MM-DD) and for years outside of this range produce output that matches the ISO 8601:2004 standard expanded representation extended format (<+/-><Underline>Y</Underline>YYYY-MM-DD).</blockquote>to: <blockquote>For years in the range [1000,9999], POSIX.1-2017 requires that the output produced match the ISO 8601:2004 standard complete representation extended format (YYYY-MM-DD) and for years greater than 9999 produce output that matches the ISO 8601:2004 standard expanded representation extended format (<+/-><Underline>Y</Underline>YYYY-MM-DD). For years less than 1000, %F is not required to produce an ISO 8601:2004 format when used without specifying at least a minimum field width. As stated above, some implementations pad %Y conversions with zeros to four digits, in which case %F produces an ISO 8601:2004 format; other implementations do not pad %Y with zeros, in which case %F does not produce an ISO 8601:2004 format .</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2013-08-23 01:11 dalias New Issue 2013-08-23 01:11 dalias Name => Rich Felker 2013-08-23 01:11 dalias Organization => musl libc 2013-08-23 01:11 dalias Section => strftime 2013-08-23 01:11 dalias Page Number => unknown 2013-08-23 01:11 dalias Line Number => unknown 2013-09-05 15:52 eblake Tag Attached: c99 2013-09-05 15:53 Don Cragun Page Number unknown => 2023 2013-09-05 15:53 Don Cragun Line Number unknown => 64612-64623 2013-09-05 15:53 Don Cragun Interp Status => --- 2014-05-29 15:15 nick File Added: dr_strftime.html 2014-05-29 15:21 nick File Deleted: dr_strftime.html 2014-05-29 15:21 nick File Added: dr_strftime.html 2018-01-13 20:19 dennisw Issue Monitored: dennisw 2021-04-14 16:58 nick Note Added: 0005315 2021-04-14 16:59 nick Note Added: 0005316 2021-04-14 16:59 nick Note Deleted: 0005316 2021-04-15 10:05 geoffclare Note Added: 0005318 2021-05-17 15:10 geoffclare Tag Detached: c99 2023-01-26 15:14 geoffclare Note Added: 0006140 2023-01-26 15:26 geoffclare Note Edited: 0006140 2023-01-26 15:31 geoffclare Note Edited: 0006140 2023-01-26 16:16 geoffclare Note Edited: 0006140 2023-01-26 17:18 geoffclare Note Added: 0006141 ======================================================================