-
Notifications
You must be signed in to change notification settings - Fork 159
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
Rename Civil objects to Gregorian #79
Comments
@maggiepint @mj1856 @bterlson you were the one kicking of that discussion on Twitter if I recall correctly. Input? |
@pipobscure , I think there are only 2 ways to define a "day" for civil usage: apparent solar time & mean solar time. (There are other ways for other purposes, such as Sidereal Day, Julian day, etc) For mean solar time (or specifically clock time defined in IEC 60050-111 which is adopted by ISO 8601), as it's (almost) always 24h, no matter when it starts and ends, it's ok to use existing CivilTime. (though the start & end determinate when is "now", like time zone). For apparent solar time, Hebrew calendar requires time system to be apparent solar time with starting & ending at sunset. But I'm not sure if other calendars have such requirement. And I think actually Gregorian calendar doesn't require the day to be 24-hour clock, this is requirement of ISO 8601.
From the specification 3.2.3 Time scales within the calendar day. This implies that Gregorian calendar doesn't enforce time clock to be 24-hour clock too. |
Just to add to the above list: compare with time and day cycle with ethiopian. The time cycle might be considered separate from the calendar cycle. In any event, perhaps the concept is local time, or wall time. Joda/310 calls these"localtime/localdate" , Unicode TR#35 calls these "wall time" |
|
WallTime would then mean different things in Addis Ababa, in Tel Aviv and in New York. That's precisely why I am proposing Now I'm good with not calling it |
Isn’t that point? It’s supposed to be a time that means different things depending on where you stand. |
@ljharb sorry for being unobvious. I picked those cities not because of timezones (where yes you're right), but rather because: Addis Ababa uses Ethiopian Time (day start with 0:00 at 6AM, day end with 12:00 at 6PM, then 0:00 at 6PM for night until 12:00/00:00 at 6AM for night) Tel Aviv uses the Hebrew Calendar rather than Gregorian. So Ethiopian WallTime 10:00DAY would be 16:00 WallTime using standard Midnight-Midnight practice. If we want to enable support for other calendars and time counting methods, then |
@pipobscure good points. Gregorian may be the clearest, then. |
Shouldn't
Currently, this proposal includes this statement in its principles: "All date values are based on the Proleptic Gregorian Calendar. Other calendar systems are out-of-scope for this proposal. However, we will consider how future APIs may interact with this one such that extending it to support other calendars may be possible in a future It's very unfortunate that a proposal that aims to solve this realm in JavaScript abstains to include other calendars in its scope. |
To go full circle... I still prefer |
Given existing usage, I also think |
I’m actually thinking of implementing HenrewDatetime, HebrewDate and HebrewTime as examples for other calendars/timestyles as well.
So to me the current Civil object will only ever deal with Gregorian calendar/24h-midnight based stuff.
Which is also why I’ll be proposing to remove ZonedInstant.prototype.toCivilX() methods and instead go for GregorianDatetime.fromZonedInstant() static functions.
That way the Instant/ZonedInstant objects are purely non-calendarial, and the GregorianX / HebrewX / ChineseX / EthiopianX objects will be there for different calendars/timestyles.
Since they’ll each have a fromZonedInstant() static method and a toZonedInstant() method, changing from one calendar to another will be trivial. And all of that without complicating the GregorianX objects needlessly with options and additional methods/members.
… On 18 Sep 2018, at 20:11, Kevin Smith ***@***.***> wrote:
Given existing usage, I also think Local is adequate. It's usually best to not overthink things like this too much. : )
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Maybe i'm totally off here... but in my mind the "LocalTime" (and Date/DateTime/...) thing is just a "container" for hours/minutes/... I think of it as a clock that has no "engine" ... as long as we agree on 24h/day and 60minutes/hour .. .i can set this clock to some time (8:15) and give it to you and you would also interpret it as 8:15 ... if i tell you "add 120 minutes" you would set it to 10:15 and return it and i would agree that this is correct... Now without a reference/zone this is all this clock does ... it allows me to define a time and do some math with it... i can diff two times/add them/... the result would always be well defined... Where is this time on the global timeline? No idea, and no way to tell... and thus i don't see why hebrew/ethiopian/gregorian matter here... as long as 24h/60 min is common... it should work, shouldn't it? But again... i might be totally wrong here and you all have a different thing in mind if you talk about this time class... then ignore me.. but ... given my understanding i still find "Local" or "Wall" the best prefix ... |
@phueper you are correct based on your premises, however your premises are wrong. There is no agreemenent that a day has 24 hours, that a minute is even a thing much less than an hour has 60 of them, same for seconds. We also don't have agreement that there is even such a thing as months, and if there are how many of them there are and how many days they may contain. For For What we want to enable is a distinct (and equal) set of classes to handle other cases such as (invented just now)
I realize this sounds crazy, and I only used it to explain that we want to be able to handle even that kind of thing (albeit in separate classes) but in an equal way to anything else. More realistically:
I'm ignoring the Chinese calendar (and others) for now, since I'm less familiar with it and these two amply illustrate the issues. My design goal is to create a set of temporal objects, that allow easy implementation of any calendar and easy interchange between them. At the same time I realise that some calendars are more equal than others. So I want to simply not give the Gregorian calendar with its 24h midnight-midnight day an inherent advantage and make it harder to implement other calendars. Whence my call to rename these objects. I am also suggesting we remove the I also propose (separately from this proposal, but based on it) to implement the Hebrew and Ethiopian classes as "PolyFills" to demonstrate how that would work for other cultures. |
@pipobscure, a summary of the benefits of your rename proposal (in my understanding):
|
Thanks @rxaviers for moderating all these issues. You nailed exactly what I was getting at. |
I'm prepping a presentation on the state of temporal right now. Can I take it that this is sort-of agreed? - Or I'll have to construct things a bit differently. |
Please also have a quick look at the relevant spec-text update in #89 |
@pipobscure , @srl295 , @rxaviers , @ljharb How about just |
I like it since it reflects better what it is as well!
Gregorian could actually mislead in context of Ethiopia. There the day begins at our 6am and goes to 6am (both ISO times). So this GregorianDate class would actually be wring there even though they use the Gregorian calendar.
Ceterum censeo religiones debent delerentur essent propter perniciosas sunt.
… On 22 Sep 2018, at 10:18, Remi Liu ***@***.***> wrote:
@pipobscure , @srl295 , @rxaviers , @ljharb How about just ISODate, ISOTime & ISODateTime. Then we can still have GregorianDate, HebrewDate, HebrewTime, HebrewDateTime, and avoid to have misleading GregorianTime.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
You lost me. Behind the the prefix I thought you are looking for a name prefix for proleptic Gregorian calendar dates and time as specified at ISO 8601 , but without timezone informations. Gregorian simply does not fit. And ISO is no option as well, because the unzoned character of the domain is not expressed by that prefix. |
While ISO allows for inclusion of timezones there are fully valid expressions of dates, times and datetimes as part if the standard.
So the ISO prefix works quite well.
… On 23 Sep 2018, at 11:01, Philipp Thuerwaechter ***@***.***> wrote:
You lost me.
Behind the the prefix gregorian, i would expect the historical calendar definition, valid for dates after the year 1582 only. Or maybe a mixture with the julian calendar and this gap in october 1582.
And what the hell is gregorian time ? I never heard that it stands for a 24 hour day with 60 minutes per hour, 60 seconds per minute and nanosenconds, starting a new calendar date at midnight.
I thought you are looking for a name prefix for proleptic Gregorian calendar dates and time as specified at ISO 8601 , but without timezone informations. Gregorian simply does not fit.
And ISO is no option as well, because the unzoned character of the domain is not expressed by that prefix.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Unfortunately, I am not onboard with either Gregorian or ISO.
As much as I still think my original concerns were valid, I'm now convinced that "local" is really the best option. At least, it's the least problematic of the various options. |
@mj1856 ES does have |
I agree that "Greogorian" is bad. The issue with "Local" and "Civil" is that it suggests some kind of universality. These objects do NOT represent "Local" time in Addis Ababa or Tel Aviv or ... How about Few more issues:
(Though I'm flexible on both as long as there is a coherent mental model / clear reason for it) |
They don't? Are you sure? I'd appreciate some examples, but also let's not confuse "local" for "locale". FWIW - I'm not sure about Ethiopia, but my understanding is that the Gregorian calendar and a 24 hour clock are used for most activities in Hebrew speaking areas in the world. There are other places in the world that uses different calendar systems, but not many that use different clocks. Some places may align to solar mean time or lunar observations rather than a fixed 24 hour clock, but I don't think we need to account for such things here. |
The only potential confusion I see around "local" is that it is not the local time of a given environment, but rather just a local time somewhere in the world. We can document this. |
I get that. However, we get much of that from ECMA-402 formatting. It would only make sense for a As of today, we've already agreed to only support the Proleptic Gregorian calendar anyway.
|
Example 1: In Addis Ababa the Gregorian calendar is in use. However the day starts at what to us would be 6am and has 24 hours from there. So 2018-09-27T03:00:00.000+03:00 would be expressed as “September 26th 9:00 at night” in “LocalDateTime”.
Example 2: Today in Tel Aviv is in “LocalDate” would be 17th Tishrei 5779 and posted as such in government offices.
—-
What I’m saying is that assuming the Gregorian calendar with a 24h midnight day and calling that “Local” is just a bit chauvinist.
Ceterum censeo religiones debent delerentur essent propter perniciosas sunt.
… On 26 Sep 2018, at 16:04, Matt Johnson ***@***.***> wrote:
These objects do NOT represent "Local" time in Addis Ababa or Tel Aviv or ...
They don't? Are you sure? I'd appreciate some examples, but also let's not confuse "local" for "locale".
FWIW - I'm not sure about Ethiopia, but my understanding is that the Gregorian calendar and a 24 hour clock are used for most activities in Hebrew speaking areas in the world. There are other places in the world that uses different calendar systems, but not many that use different clocks. Some places may align to solar mean time or lunar observations rather than a fixed 24 hour clock, but I don't think we need to account for such things here.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Aren't those both formatting concerns covered by ECMA-402? Also, calendars don't define time of day - only year/month/day. If that is indeed the convention used in Addis Abba, I'm not sure how we could possibly capture that in any API. It's not covered in IANA or CLDR data (as far as I am aware). It's a very interesting edge case, but I don't see why that should drive our decisions here. |
I understand there are parts of the world where "what time is it" depends heavily on your caste/religion/politics - and that two individuals in the same exact place would not necessarily agree. Again, such things seem out of scope. |
We have agreed to only deal with the proleptic Gregorian calendar at this point, so as to be able to move forward at all.
I’m actually in the process of implementing the Hebrew calendar as well as the Ethiopian version on top of this as a polyfill. This should then enable the next step of a temporal proposal.
I’m thinking of this along the lines of the ES6 class proposal. It started out as syntax sugar for function/prototype and we are now building on that.
If we make chauvinist decisions now that make it harder to do this later, then I consider this a failure.
Ceterum censeo religiones debent delerentur essent propter perniciosas sunt.
… On 26 Sep 2018, at 16:16, Matt Johnson ***@***.***> wrote:
I want the name to be one that allows for equality of other systems (Hebrew/Ethiopian/Chinese/...)
I get that. However, we get much of that from ECMA-402 formatting. It would only make sense for a HebrewDate object to exist, if we wanted to support things such as adding a quantity of Hebrew months. Taken unilaterally, that makes some assumptions about such operations being sensible in all calendars we decide to implement.
As of today, we've already agreed to only support the Proleptic Gregorian calendar anyway.
I want a solution asap.
(Don't we all? 😉 )
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
For what it's worth, I don't think using the name Local prevents us from adding types for a different calendar later - so I don't see it as exclusive per-say. It is euro-centric, but the programming language is also in English and we're not debating that yes? |
Ok. Second question is that "Local" implies a place where it's local to. The more this discussion goes on, the better I like "Civil" 😄 |
That was my original, one and only concern. The concerns with the other names seem more numerous and substantial, which led to my point about "a" local vs "the" local. There are lots of local places around the world. It's not unreasonable to take a local value, and another local value, and assert that they are from two different locations. A focus point on this in the spec text is a must. |
Given this discussion, I think we are better of leaving this alone and retain Civil. It's better than Local and has less implications. My only complaint with Civil would be that it sounds too generic, but that goes for most of the alternatives as well. Anyone mind me closing this, with the conclusion: We retain the naming as Civil and withdraw the issue? |
Certainly for the time being. As of today, we are looking to advance to Stage 2 of the ECMAScript proposal process. We don't need to resolve the naming issue until Stage 3. |
We recently had debates on twitter and per phone which expressed a dislike to the prefix
Civil
to describe the temporal objects. The alternate suggestion was to useSimple
or any number of other things.One more option is to use
Gregorian
which I'd like to advocate for. The reason I'd like to advocate for that, is because it's clear, it is explicitly for the Gregorian Calendar, and supporting different calendars would be done via different objects. This would allow for big gains now without precluding differing calendars in the future.I'd also argue that this holds true even for
CivilTime
(which arguably has no calendar by suggesting that even times are calendar-system dependant.Take the hebrew calendar as an example. Shabat starts on a Friday at sunset to Saturday at sunset. It could be argued therefore that the time in the hebrew calendar begins/ends at sunset rather than at midnight in the Gregorian calendar. While I'm not an expert in the hebrew calendar, the example goes to show that it is quite reasonable to express even time in terms of the calendar in use.
Feedback/Comments Please
The text was updated successfully, but these errors were encountered: