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

Specify era/eraYear. #1311

Merged
merged 1 commit into from
Jan 21, 2021
Merged

Specify era/eraYear. #1311

merged 1 commit into from
Jan 21, 2021

Conversation

Ms2ger
Copy link
Collaborator

@Ms2ger Ms2ger commented Jan 20, 2021

Fixes #1308.

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #1311 (77d142d) into main (71fca25) will decrease coverage by 0.15%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1311      +/-   ##
==========================================
- Coverage   95.77%   95.61%   -0.16%     
==========================================
  Files          19       19              
  Lines        9419     9373      -46     
  Branches     1445     1437       -8     
==========================================
- Hits         9021     8962      -59     
- Misses        392      405      +13     
  Partials        6        6              
Flag Coverage Δ
test262 55.93% <ø> (-0.22%) ⬇️
tests 91.72% <ø> (-0.09%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
polyfill/lib/plaindate.mjs 94.63% <ø> (ø)
polyfill/lib/plaindatetime.mjs 95.47% <ø> (ø)
polyfill/lib/plainmonthday.mjs 90.69% <ø> (ø)
polyfill/lib/plaintime.mjs 96.62% <ø> (ø)
polyfill/lib/plainyearmonth.mjs 94.76% <ø> (ø)
polyfill/lib/zoneddatetime.mjs 97.90% <ø> (ø)
lib/timezone.mjs
lib/intl.mjs
lib/zoneddatetime.mjs
lib/temporal.mjs
... and 34 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71fca25...36baaf1. Read the comment docs.

1. Perform ? RequireInternalSlot(_calendar_, [[InitializedTemporalCalendar]]).
1. If _calendar_.[[Identifier]] is *"iso8601"*, then
1. Return *undefined*.
1. Let _era_ be the result of implementation-defined processing of _dateOrDateTime_ and the value of _calendar_.[[Identifier]].
Copy link
Member

@ljharb ljharb Jan 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is very hand-wavey. can this be elaborated on, or made less imprecise?

spec/intl.html Outdated
1. Perform ? RequireInternalSlot(_calendar_, [[InitializedTemporalCalendar]]).
1. If _calendar_.[[Identifier]] is *"iso8601"*, then
1. Return *undefined*.
1. Let _era_ be the result of implementation-defined processing of _dateOrDateTime_ and the value of _calendar_.[[Identifier]].
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

<emu-clause id="sup-temporal.calendar.prototype.erayear">
<h1>Temporal.Calendar.prototype.eraYear ( _dateOrDateTime_ )</h1>
<p>
The `eraYear` method takes one argument _dateOrDateTime_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `eraYear` method takes one argument _dateOrDateTime_.
The `eraYear` method takes one argument, _dateOrDateTime_.

What kind of argument?

<emu-clause id="sup-temporal.calendar.prototype.era">
<h1>Temporal.Calendar.prototype.era ( _dateOrDateTime_ )</h1>
<p>
The `era` method takes one argument _dateOrDateTime_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `era` method takes one argument _dateOrDateTime_.
The `era` method takes one argument, _dateOrDateTime_.

What kind of argument?

spec/intl.html Show resolved Hide resolved
Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what to do about the vagueness of the "implementation-defined processing" bits. We can't really specify out all the ICU calendars, but on the other hand I do take the point that it is weird to have methods that return either undefined or an implementation-defined result with no explanation.

Would that situation be sufficiently improved when we add the corresponding explanation in the documentation, or does there need to be some explanation in the spec text as well?

spec/intl.html Outdated Show resolved Hide resolved
@ljharb
Copy link
Member

ljharb commented Jan 20, 2021

I think it needs to be clear in the spec steps.

@Ms2ger
Copy link
Collaborator Author

Ms2ger commented Jan 21, 2021

Editorial improvements are still welcome, of course, but I've merged this in the interest of stabilizing the normative parts of the spec.

@ljharb
Copy link
Member

ljharb commented Jan 21, 2021

Given there’s still a number of open review comments, I’m not sure why merging prior to addressing them is stabilizing.

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

Successfully merging this pull request may close these issues.

Add extra calendar field getters to the 402 portion of the spec text
3 participants