View Issue Details

IDProjectCategoryView StatusLast Update
00004721003.1(2008)/Issue 7System Interfacespublic2024-06-11 08:53
Reportermarkh Assigned Toajosey  
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted As Marked 
NameMark Harris
Organization
User Reference
Sectionstrftime
Page Number2008
Line Number63559
Interp StatusApproved
Final Accepted Textsee 0000472:0004270
Summary0000472: strftime %C does not account for sign character
DescriptionThe text for strftime conversion specifier %C does not account for
any required sign character in the total number of output characters.
As a result it contradicts other text which does include this character.

For example, suppose strftime is called with format string "%+2C"
or "%+3C" and tm_year = 8100 (i.e. year 10000). Line 63523 requires
that "a leading <plus-sign> character shall be included" but line
63561 allows only the 3 characters required by the digits.

Like the text for %G and %Y, the text for %C should account for any
required sign character.
Desired ActionOn line 63559 and line 63561
Change:

  ...number of digits...

to:

  ...number of digits and leading sign characters (if any)...
Tagstc3-2008

Relationships

has duplicate 0001184 Closed 1003.1(2016/18)/Issue7+TC2 strftime %C padding character unspecified 

Activities

geoffclare

2011-07-07 11:36

manager   bugnote:0000886

There is also an ambiguity in the text "the number of digits in the
year divided by 100". It can be read as:

    <the number of digits in> <the year divided by 100>

as intended, or as:

    <the number of digits in the year> <divided by 100>

Another rather picky point is that it doesn't mention the truncation.
Line 63556 implies this is a separate operation applied after the
division, so the later reference to "year divided by 100" could be
taken as omitting the truncation (and thus the number of digits
could be considered to include any digits after the decimal point).

In addition the text uses "will" instead of "shall".

Change L63558-63562 from:

    If a minimum field width is not specified, the number of
    characters placed into the array pointed to by s will be the
    number of digits in the year divided by 100 or two, whichever is
    greater. [CX] If a minimum field width is specified, the number
    of characters placed into the array pointed to by s will be the
    number of digits in the year divided by 100 or the minimum field
    width, whichever is greater.[/CX]

to:

    If a minimum field width is not specified, the number of
    characters placed into the array pointed to by s shall be the
    number of digits and leading sign characters (if any) in the
    result of dividing the year by 100 and truncating, or two,
    whichever is greater. [CX] If a minimum field width is specified,
    the number of characters placed into the array pointed to by s
    shall be the number of digits and leading sign characters (if any)
    in the result of dividing the year by 100 and truncating, or the
    minimum field width, whichever is greater.[/CX]

On P2009 L63622 (Y conversion) change "will" to "shall".

markh

2011-07-28 07:32

reporter   bugnote:0000892

Also on P2009 L63584 (G conversion) change "will" to "shall".

eblake

2011-08-11 15:38

manager   bugnote:0000936

Last edited: 2019-02-28 16:40

OLD Interpretation response (superseded by 0000472:0004270)
------------------------
The standard states that %C must produce output with width that is inconsistent when there is a leading sign, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor.

Rationale:
-------------
The standard should be consistent between %C, %G, and %Y.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------
Make the changes suggested in 0000472:0000886 and 0000472:0000892

ajosey

2012-06-29 16:19

manager   bugnote:0001301

Interpretation proposed 29 June 2012 for final 45 day review

ajosey

2012-08-30 09:11

manager   bugnote:0001342

Interpretation approved 30 Aug 2012

nick

2019-02-25 17:05

manager   bugnote:0004266

Reopened to resolve differences with bug:1184

geoffclare

2019-02-28 14:43

manager   bugnote:0004270

Interpretation response
------------------------
The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor.

Rationale:
-------------
The standard should be consistent between %C, %G, and %Y.

Notes to the Editor (not part of this interpretation):
-------------------------------------------------------

Change L63558-63562 from:
If a minimum field width is not specified, the number of characters placed into the array pointed to by s will be the number of digits in the year divided by 100 or two, whichever is greater. [CX] If a minimum field width is specified, the number of characters placed into the array pointed to by s will be the number of digits in the year divided by 100 or the minimum field width, whichever is greater.[/CX]
to:
If a minimum field width is not specified:
  • If the year is between 0 and 9999 inclusive, two characters shall be placed into the array pointed to by s, including a leading '0' if there would otherwise be only a single digit.

  • [CX]If the year is less than 0 or greater than 9999, the number of characters placed into the array pointed to by s shall be the number of digits and leading sign characters (if any) in the result of dividing the year by 100 and truncating, or two, whichever is greater.[/CX]
[CX] If a minimum field width is specified, the number of characters placed into the array pointed to by s shall be the number of digits and leading sign characters (if any) in the result of dividing the year by 100 and truncating, or the minimum field width, whichever is greater.[/CX]

On P2009 L63584 (G conversion) change "will" to "shall".

On P2009 L63622 (Y conversion) change "will" to "shall".

agadmin

2019-03-12 14:05

administrator   bugnote:0004316

Interpretation Proposed: 12 March 2019

agadmin

2019-04-17 10:52

administrator   bugnote:0004368

Interpretation approved: 17 April 2019

Issue History

Date Modified Username Field Change
2011-07-07 08:37 markh New Issue
2011-07-07 08:37 markh Status New => Under Review
2011-07-07 08:37 markh Assigned To => ajosey
2011-07-07 08:37 markh Name => Mark Harris
2011-07-07 08:37 markh Section => strftime
2011-07-07 08:37 markh Page Number => 2008
2011-07-07 08:37 markh Line Number => 63559
2011-07-07 11:36 geoffclare Note Added: 0000886
2011-07-28 07:32 markh Note Added: 0000892
2011-08-11 15:38 eblake Note Added: 0000936
2011-08-11 15:40 eblake Interp Status => ---
2011-08-11 15:40 eblake Final Accepted Text => see 0000472:0000936
2011-08-11 15:40 eblake Status Under Review => Resolved
2011-08-11 15:40 eblake Resolution Open => Accepted As Marked
2011-08-11 15:40 eblake Tag Attached: issue8
2011-08-11 15:41 eblake Interp Status --- => Pending
2011-08-11 18:08 Don Cragun Status Resolved => Interpretation Required
2012-06-29 16:19 ajosey Interp Status Pending => Proposed
2012-06-29 16:19 ajosey Note Added: 0001301
2012-08-30 09:11 ajosey Interp Status Proposed => Approved
2012-08-30 09:11 ajosey Note Added: 0001342
2019-02-21 17:29 eblake Relationship added related to 0001184
2019-02-25 16:57 nick Resolution Accepted As Marked => Reopened
2019-02-25 17:05 nick Note Added: 0004266
2019-02-28 14:43 geoffclare Note Added: 0004270
2019-02-28 14:44 geoffclare Tag Detached: issue8
2019-02-28 16:32 geoffclare Interp Status Approved => Pending
2019-02-28 16:32 geoffclare Final Accepted Text see 0000472:0000936 => see 0000472:0004270
2019-02-28 16:32 geoffclare Resolution Reopened => Accepted As Marked
2019-02-28 16:32 geoffclare Tag Attached: tc3-2008
2019-02-28 16:36 Don Cragun Relationship replaced has duplicate 0001184
2019-02-28 16:40 geoffclare Note Edited: 0000936
2019-03-12 14:05 agadmin Interp Status Pending => Proposed
2019-03-12 14:05 agadmin Note Added: 0004316
2019-04-17 10:52 agadmin Interp Status Proposed => Approved
2019-04-17 10:52 agadmin Note Added: 0004368
2019-10-18 11:07 geoffclare Status Interpretation Required => Applied
2024-06-11 08:53 agadmin Status Applied => Closed