-
Notifications
You must be signed in to change notification settings - Fork 155
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
Should we support alternate ways of telling time? #522
Comments
Let's discuss this over the meeting, shall we? |
Meeting, May 7: Temporal won't support it at this time, but we'll take a future-proof approach by changing the names of the calendar methods to have Action for @sffc, to make this change in the calendar explainer. |
What’s keeping this issue open? |
|
Happy to take this one as well, I'm on a closing-issues spree |
Calendar.plus -> Calendar.datePlus Calendar.minus -> Calendar.dateMinus Calendar.difference -> Calendar.dateDifference Rename some methods to have `date` in the name so that if there are use cases for a time-based calendar then later timePlus, timeMinus, and timeDifference can be added. Closes: #522
Calendar.plus -> Calendar.datePlus Calendar.minus -> Calendar.dateMinus Calendar.difference -> Calendar.dateDifference Rename some methods to have `date` in the name so that if there are use cases for a time-based calendar then later timePlus, timeMinus, and timeDifference can be added. Closes: #522
The decision here was based purely on not having use-cases. This needs revisiting. |
Can you say more about the use cases so that we can discuss what changes will be necessary? |
I'm open to revisiting this discussion, but I would like to very strongly suggest that we do so with the following parameter: we retain "days" as a universal unit with the same length in all calendars. This assumption is what has enabled us to perform 1-to-1 conversion between calendar systems and ISO-8601, which is the basis of the Temporal data model. In other words, it's totally okay with me if the calendar redefines how the clock works, as long as the clock is periodic each |
This was a straggler from the time calendar support (#522)
This was a straggler from the time calendar support (#522)
Meeting, Nov. 12: Based on reexamining of the use cases (see #1087 and https://unicode-org.atlassian.net/browse/CLDR-9716) we are not certain that we've properly understood how time calendars should be implemented and have decided to leave them out of the current proposal. Things to consider:
This is a solution that we believe addresses everyone's concerns:
|
One note to add to above now that #1087 is closed:
|
One more amendment, I'm assuming we will remove |
There is no It's a bummer that we're committing to a strange name for the "get the current local time" API in return for a potential future feature that we know will be rarely used even in the future. But I guess it's at least consistent with the pattern used elsewhere where any time developers want the "normal" result they'll need to stick an "ISO" at the end of the method name. :-( |
I think that was an oversight in the docs, it was present in the polyfill. |
It seems kind-of silly that we have a calendar slot on PlainTime that doesn't do anything. I'm okay with |
- Remove Calendar.timeFromFields(), Calendar.timeAdd(), Calendar.timeUntil(), Calendar.hour(), ..., Calendar.nanosecond(). - Remove PlainTime.withCalendar(). - Remove now.plainTime(). - Remove the calendar argument from PlainTime constructor. - Remove the calendarName option from PlainTime.toString(). - Throw if there's a non-ISO calendar passed to PlainTime.from(). - The value of PlainTime.calendar is always the ISO calendar. - Leave the names of the slots, the properties returned from PlainTime.getFields() and PlainTime.getISOFields(). See: #522
SGTM |
- Remove Calendar.timeFromFields(), Calendar.timeAdd(), Calendar.timeUntil(), Calendar.hour(), ..., Calendar.nanosecond(). - Remove PlainTime.withCalendar(). - Remove now.plainTime(). - Remove the calendar argument from PlainTime constructor. - Remove the calendarName option from PlainTime.toString(). - Throw if there's a non-ISO calendar passed to PlainTime.from(). - The value of PlainTime.calendar is always the ISO calendar. - Leave the names of the slots, the properties returned from PlainTime.getFields() and PlainTime.getISOFields(). See: #522
- Remove Calendar.timeFromFields(), Calendar.timeAdd(), Calendar.timeUntil(), Calendar.hour(), ..., Calendar.nanosecond(). - Remove PlainTime.withCalendar(). - Remove now.plainTime(). - Remove the calendar argument from PlainTime constructor. - Remove the calendarName option from PlainTime.toString(). - Throw if there's a non-ISO calendar passed to PlainTime.from(). - The value of PlainTime.calendar is always the ISO calendar. - Leave the names of the slots, the properties returned from PlainTime.getFields() and PlainTime.getISOFields(). See: #522
- Remove Calendar.timeFromFields(), Calendar.timeAdd(), Calendar.timeUntil(), Calendar.hour(), ..., Calendar.nanosecond(). - Remove PlainTime.withCalendar(). - Remove now.plainTime(). - Remove the calendar argument from PlainTime constructor. - Remove the calendarName option from PlainTime.toString(). - Throw if there's a non-ISO calendar passed to PlainTime.from(). - The value of PlainTime.calendar is always the ISO calendar. - Leave the names of the slots, the properties returned from PlainTime.getFields() and PlainTime.getISOFields(). See: #522
- Remove Calendar.timeFromFields(), Calendar.timeAdd(), Calendar.timeUntil(), Calendar.hour(), ..., Calendar.nanosecond(). - Remove PlainTime.withCalendar(). - Remove now.plainTime(). - Remove the calendar argument from PlainTime constructor. - Remove the calendarName option from PlainTime.toString(). - Throw if there's a non-ISO calendar passed to PlainTime.from(). - The value of PlainTime.calendar is always the ISO calendar. - Leave the names of the slots, the properties returned from PlainTime.getFields() and PlainTime.getISOFields(). See: #522
- Remove Calendar.timeFromFields(), Calendar.timeAdd(), Calendar.timeUntil(), Calendar.hour(), ..., Calendar.nanosecond(). - Remove PlainTime.withCalendar(). - Remove now.plainTime(). - Remove the calendar argument from PlainTime constructor. - Remove the calendarName option from PlainTime.toString(). - Throw if there's a non-ISO calendar passed to PlainTime.from(). - The value of PlainTime.calendar is always the ISO calendar. - Leave the names of the slots, the properties returned from PlainTime.getFields() and PlainTime.getISOFields(). See: #522
We allow custom calendars to use different fields for specifying a date (for example, the Japanese calendar can add era). However, according to #389, days are unconditionally defined as solar days on Earth, primarily so that we can have a 1-to-1 mapping with the ISO calendar system.
Should we allow calendars that use alternate ways of telling time within the solar day? For example, maybe a calendar uses something other than hours, minutes, and seconds for subdividing the day. I have heard of such calendars, but I don't know specific examples off the top of my head.
Additional Context: https://github.com/tc39/proposal-temporal/pull/520/files#r412515900
The text was updated successfully, but these errors were encountered: