tc39 / proposal-intl-eradisplay

Intl.DateTimeFormat displays era field only if date displayed is in same era as today's
MIT License
10 stars 4 forks source link

Japanese calendar and eraDisplay #8

Open sffc opened 1 year ago

sffc commented 1 year ago

I think this is reasonable except for the splitting of era and year. In Japan, the current year is either 2022 or R4 (令和4年) but not just 4(年). Beyond just awkwardness, this would have the potential of incurring confusion between calendar years and year-length durations (as, depending on context, 4年 could also mean "4 years").

Originally posted by @rkirsling in https://github.com/tc39/proposal-intl-eradisplay/issues/7#issuecomment-1330698807

sffc commented 1 year ago

CC @Louis-Aime

sffc commented 1 year ago

Discussion: the decision for whether to display the era with "auto" may depend on:

  1. Calendar system
  2. Locale
  3. Current date

However, the spec currently only allows differentiation on (3). The spec should be updated to allow all three.

The same problem may also come up in other contexts such as whether or not to display relatedISO. The same sort of model can be applied in the future.

Louis-Aime commented 7 months ago

As of "today" (2023-12), the decision for whether to display the era (when "year" shall be displayed) already depends on calendar and the language and possibly region tags of the locale. In certain cases, the author cannot change that decision.

One objective of the proposal is to give back some power to the author. The other main objective is to make the decision to display the era depend on the date displayed. I think we have to make clear all these objectives, by adding values for the option:

sffc commented 6 months ago

TG2 discussion: https://github.com/tc39/ecma402/blob/master/meetings/notes-2023-12-14.md#eradisplay-updates