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

Allow ISO strings with bracketed time zone and no offset #1024

Merged
merged 3 commits into from
Oct 21, 2020

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Oct 20, 2020

Closes: #933

Previously it would return an object with 'offset' and 'ianaName'
properties and also a 'zone' property which was equal to 'ianaName' if
present, and 'offset' if not. This is no longer always the preferred order
due to the options in Temporal.ZonedDateTime.from(), so just have it
return each property separately if it is present, and implement the
preferred order on the caller's end.
The time zone properties are undefined if not present, not null, and the
spec also has the calendar field of the record being undefined if not
present.
Previously we considered a "time zone part" to be an offset plus an
optional bracketed name. Now an ISO string may have either of an "offset
part" and "time zone name part", independently of each other.

Closes: #933
@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #1024 into main will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1024   +/-   ##
=======================================
  Coverage   94.23%   94.24%           
=======================================
  Files          18       18           
  Lines        6284     6290    +6     
  Branches      932      938    +6     
=======================================
+ Hits         5922     5928    +6     
  Misses        355      355           
  Partials        7        7           
Flag Coverage Δ
#test262 46.39% <73.33%> (+<0.01%) ⬆️
#tests 90.22% <94.73%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
polyfill/lib/ecmascript.mjs 95.82% <100.00%> (+0.01%) ⬆️
polyfill/lib/regex.mjs 100.00% <100.00%> (ø)

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 e792594...e3019eb. Read the comment docs.

@Ms2ger Ms2ger merged commit cb2ce79 into main Oct 21, 2020
@Ms2ger Ms2ger deleted the 933-iso-string-no-offset branch October 21, 2020 10:15
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.

Decide whether ISO string with bracketed time zone name but no offset is valid
2 participants