tc39 / proposal-intl-formatToParts

Intl 402 spec proposal for {DateTimeFormat,Number}.prototype.formatToParts
17 stars 17 forks source link

Why are negative years botched like that? #5

Closed georgir closed 5 years ago

georgir commented 5 years ago
if (p === 'year' && v <= 0)
  v = 1 - v;

Why?

georgir commented 5 years ago

I realized it is to be combined with BC indicator after posting this. But it still does not make sense to always force that format. In some cases users may want to be consistent with RFC 822 (Date.prototype.toString) or RFC 3339 or ISO 8601 (Date.prototype.toISOString) formats which show negative years simply as negative numbers.

georgir commented 5 years ago

I also realize now that this should be addressed to https://github.com/tc39/ecma402 Apologies for the noise.