| Description | The strptime() %y description says it is the "last 2 digits of the year" but this is misleading, as later text makes it clear the field can have 1 digit.
Specifically, the description of %y says "leading zeros shall be permitted but shall not be required". Since leading zeros are not required, a single digit input field is explicitly permitted, e.g. "1" is allowed; it doesn't have to be "01". Likewise, the statement "A leading '+' or '-' character shall be permitted" means that there is no requirement for there to be two digits because the only way for a 2-character field to have a leading '+' or '-' is if the second character is the only digit.
|
|---|
| Desired Action | Change:The last two digits of the year; leading zeros shall be permitted but shall not be required. A leading '+' or '-' character shall be permitted before any leading zeros but shall not be required. If a C conversion is not also performed, values in the range [69,99] shall refer to years 1969 to 1999 inclusive and values in the range [00,68] shall refer to years 2000 to 2068 inclusive. to:The last two digits of the year, for years greater than 9, or a value to be added to the year obtained from a C conversion (if any); leading zeros shall be permitted but shall not be required. A leading '+' or '-' character shall be permitted before any leading zeros but shall not be required. If a C conversion is not also performed, values in the range [69,99] shall be added to the year 1900 and values in the range [-9,68] shall be added to the year 2000.
|
|---|