-
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 Temporal.Absolute to Temporal.Instant #936
Conversation
Codecov Report
@@ Coverage Diff @@
## main #936 +/- ##
=======================================
Coverage 93.54% 93.54%
=======================================
Files 17 17
Lines 5671 5671
Branches 856 856
=======================================
Hits 5305 5305
Misses 359 359
Partials 7 7
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks very much, this is very helpful! I'll take a look at it ASAP. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for doing this giant rename! I've looked through it and I saw a few missed ones, which is entirely understandable with such a huge rename! If you don't have time to do those, no worries. The fact that the bulk of it is done already in this PR has already been incredibly helpful.
We still need to rename everything in the spec as well. Are you interested in doing that or should we save that for a follow up PR?
Thx for so detailed review. I've changed all places which you mentioned and merged conflicts. Waiting for the automatic tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I found a few more leftovers, but in general I think we should just merge this even if there are still a few places that it says "absolute" and fix the rest later. Otherwise rebasing it will get painful.
We might decide to refer to "exact time" instead of "instant time" (only in the documentation text, not the API!) but that's not decided yet, it's being discussed in #926.
docs/datetime.md
Outdated
@@ -719,7 +719,7 @@ This method overrides `Object.prototype.valueOf()` and always throws an exceptio | |||
This is because it's not possible to compare `Temporal.DateTime` objects with the relational operators `<`, `<=`, `>`, or `>=`. | |||
Use `Temporal.DateTime.compare()` for this, or `datetime.equals()` for equality. | |||
|
|||
### datetime.**toAbsolute**(_timeZone_ : object | string, _options_?: object) : Temporal.Absolute | |||
### datetime.**toAbsolute**(_timeZone_ : object | string, _options_?: object) : Temporal.Instant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be renamed as well:
### datetime.**toAbsolute**(_timeZone_ : object | string, _options_?: object) : Temporal.Instant | |
### datetime.**toInstant**(_timeZone_ : object | string, _options_?: object) : Temporal.Instant |
docs/instant.md
Outdated
startAbsolute: Temporal.Instant.from('2020-03-30T15:00-04:00[America/New_York]'), | ||
endAbsolute: Temporal.Instant.from('2020-03-30T16:00-04:00[America/New_York]') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
startAbsolute: Temporal.Instant.from('2020-03-30T15:00-04:00[America/New_York]'), | |
endAbsolute: Temporal.Instant.from('2020-03-30T16:00-04:00[America/New_York]') | |
startInstant: Temporal.Instant.from('2020-03-30T15:00-04:00[America/New_York]'), | |
endInstant: Temporal.Instant.from('2020-03-30T16:00-04:00[America/New_York]') |
docs/instant.md
Outdated
@@ -555,14 +554,14 @@ console.log(str); | |||
|
|||
// To rebuild from the string: | |||
function reviver(key, value) { | |||
if (key.endsWith('Absolute')) return Temporal.Absolute.from(value); | |||
if (key.endsWith('Absolute')) return Temporal.Instant.from(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (key.endsWith('Absolute')) return Temporal.Instant.from(value); | |
if (key.endsWith('Instant')) return Temporal.Instant.from(value); |
docs/localdatetime-draft.md
Outdated
@@ -87,15 +87,15 @@ But since it represents an unambiguous moment in time (like Absolute, and unlike | |||
To create one, you use `Temporal.LocalDateTime.from`, or the `toLocalDateTime()` method of another Temporal type. | |||
- From a string: `from(string)` | |||
- From raw DateTime fields: `from({ year, month, day, etc., timeZone, timeZoneOffsetNanoseconds })` | |||
- From an Absolute: `absolute.toLocalDateTime(timeZone)` | |||
- From an Absolute: `instant.toLocalDateTime(timeZone)` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- From an Absolute: `instant.toLocalDateTime(timeZone)` | |
- From an Instant: `instant.toLocalDateTime(timeZone)` |
Github did something stupid - I'll deal with it. |
@ryzokuken said that I can help here. Looks like the pull request belongs to #602 but I am not sure. Feel free to decline