Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which era should be the year anchor for the ethiopic calendar? #534

Open
justingrant opened this issue Jan 28, 2021 · 14 comments
Open

Which era should be the year anchor for the ethiopic calendar? #534

justingrant opened this issue Jan 28, 2021 · 14 comments
Labels
Temporal Issues relating to Intl support in Temporal

Comments

@justingrant
Copy link
Contributor

justingrant commented Jan 28, 2021

Temporal.PlainDate has two different year properties: an eraYear property that's used in a pair with era, and a signed year property (@sffc calls this "algebraic year") that's used without an era to better mirror ISO behavior and therefore make it easier to write code that works across all ICU calendars.

year is always relative to a per-calendar "anchor era". For almost all ICU calendars, the choice of anchor era is obvious because there's only one era that counts years forwards. (Backwards-counting eras like BC should never be the anchor.)

However, there are two ICU calendars with more than one forward-counting era: japanese and ethiopic. For japanese where there are many eras (with more expected in the future), we're planning to use the ISO year for year which sidesteps the anchor era question. See tc39/proposal-temporal#526 for more details.

But what about ethiopic? There are two eras: one starting -005492-07-17 and another starting +000008-08-27. The first era is identical to ethioaa's only era, while the second era is unique to ethiopic.

Which era should be the anchor?

Option 1: -005492-07-17 should be the anchor because otherwise ethiopic's year would be identical to ethioaa's year, and SHOULD NOT be the same because the user presumably chose ethiopic not ethioaa for a good reason?
Option 2: +000008-08-27 should be the anchor because ethiopic's year would be identical to ethioaa's year, and SHOULD be the same to maximize cross-calendar compatibility for developers servicing Ethiopian users?

I don't have enough context about how ethioaa vs. ethiopic is used to have an opinion about which option is better.

I assume that the answer depends on the cultural expectations of an ethiopic calendar user. If a year is shown with no era, would that user expect it to be relative to the earlier era or the later one?

@sffc @Manishearth

@sffc sffc added the Temporal Issues relating to Intl support in Temporal label Jan 28, 2021
@justingrant justingrant changed the title Which era should be the anchor for the ethiopic calendar? Which era should be the year anchor for the ethiopic calendar? Jan 28, 2021
@Manishearth
Copy link

No strong opinion but rough lean towards Option 2, because modern dates is what ethiopic folks would be used to.

@justingrant
Copy link
Contributor Author

Should this issue be ported to https://github.com/tc39/proposal-intl-era-monthcode ? @FrankYFTang @sffc

@sffc
Copy link
Contributor

sffc commented Jan 27, 2023

The anchor era should be the one with the same name as the calendar, which is the one starting in 0008 CE

@kabaros
Copy link

kabaros commented May 28, 2024

I assume that the answer depends on the cultural expectations of an ethiopic calendar user. If a year is shown with no era, would that user expect it to be relative to the earlier era or the later one?

just to answer this part, I think the user - in Ethiopia - would expect year to be shown in the later era. We are using Temporal at dhis2 to support ethiopic calendars for Health Information System for the ministry of health in Ethiopia, we have created a wrapper around Temporal for our internal use, and in several places, we have code like this and this to accommodate the expectation that systems we integrate with expect the new era's year rather than the old ones.

@justingrant
Copy link
Contributor Author

@sffc @Manishearth It sounds like @kabaros would prefer the ethiopic calendar's anchor to be the later era, different from ethioaa. Should we make this change in Temporal polyfills?

@kabaros thanks so much for your feedback!

@sffc
Copy link
Contributor

sffc commented May 28, 2024

Yes; it sounds like everyone in this thread is in agreement that year for ethiopic should be relative to the incar era starting on 0008-08-29 (après l’Incarnation)

@justingrant
Copy link
Contributor Author

@kabaros - some follow-up questions for you about the Ethiopian calendar:

What is the era and year number before year 1 of the AA era? (This is the year that starts on -005492-07-17 in the ISO 8601 calendar.)

Is there a "year zero" in that era? Or is there another era used? Or is it irrelevant because the Ethiopian calendar is intended to record the beginning of the world, so the concept of "before the beginning of the world" doesn't really exist in this calendar?

Note that V8 today assumes that there's a year 0, a year -1, etc.

new Intl.DateTimeFormat("en", {calendar: 'ethiopic', timeZone: 'UTC'}).format(new Date('-005492-07-17'));
// => '1/1/1 ERA0'

new Intl.DateTimeFormat("en", {calendar: 'ethiopic', timeZone: 'UTC'}).format(new Date('-005492-07-16'));
// => '13/5/0 ERA0'

new Intl.DateTimeFormat("en", {calendar: 'ethiopic', timeZone: 'UTC'}).format(new Date('-005493-07-17'));
// => '13/6/-1 ERA0'

@anba
Copy link
Contributor

anba commented May 29, 2024

Note that V8 today assumes that there's a year 0, a year -1, etc.

This isn't V8 specific, but actually directly comes from ICU4C. Compared to that, ICU4X currently uses two eras incar and pre-incar (https://docs.rs/icu/latest/icu/calendar/ethiopian/struct.Ethiopian.html#era-codes), which aren't really compatible with the era codes from https://tc39.es/proposal-intl-era-monthcode/#table-eras.

Also see:

@kabaros
Copy link

kabaros commented May 29, 2024

What is the era and year number before year 1 of the AA era? (This is the year that starts on -005492-07-17 in the ISO 8601 calendar.)

@justingrant - I am not sure about the answer to this. I am forwarding the question to my colleague @abyot. He knows much more about ethiopic calendars than me.

@justingrant
Copy link
Contributor Author

@Manishearth @sffc do you have any guidance for these questions about era definition?

@Manishearth
Copy link

Or is it irrelevant because the Ethiopian calendar is intended to record the beginning of the world, so the concept of "before the beginning of the world" doesn't really exist in this calendar?

It should be irrelevant, I'm not aware of any calendar which is anchored on a world-creation date for an era and also has any accepted rendering for dates before that.

(though technically all ecclesiastical calendars for Abrahamic religions have an Anno Mundi that is after the seven days of Creation, so technically there might be a reason to talk of a small number of dates pre-A.M. It does not appear that anyone actually does so in terms of actual dates rather than "day of Creation")

@sffc
Copy link
Contributor

sffc commented May 31, 2024

CLDR data:

        <calendar type="ethiopic">
          <calendarSystem type="other"/>
          <eras>
              <era type="0" end="8-08-28" code="ethioaa" aliases="ethiopic-amete-alem mundi"/>
              <era type="1" start="8-08-29" code="ethiopic" aliases="incar"/>
          </eras>
        </calendar>
        <calendar type="ethiopic-amete-alem">
          <eras>
              <era type="0" end="-5492-08-29" code="ethioaa" aliases="ethiopic-amete-alem mundi"/>
          </eras>
        </calendar>

So dates before epoch should be represented in the mundi era according to CLDR.

I'm still waiting on proposal-intl-era-monthcode to land to clear things up.

@justingrant
Copy link
Contributor Author

So dates before epoch should be represented in the mundi era according to CLDR.

According to CLDR, does mundi have a year zero? And what's the year before mundi 1? What's two years before that year?

@sffc
Copy link
Contributor

sffc commented May 31, 2024

So dates before epoch should be represented in the mundi era according to CLDR.

According to CLDR, does mundi have a year zero? And what's the year before mundi 1? What's two years before that year?

Unless specified otherwise, years are considered to be ..., -2, -1, 0, 1, 2, ... and eras that use 1-N counting are indicated with "inverse" in the XML

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Temporal Issues relating to Intl support in Temporal
Projects
None yet
Development

No branches or pull requests

5 participants