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

Editorial: Structured headers, AO for formatting UTC offset with nanoseconds #2644

Merged
merged 3 commits into from
Aug 10, 2023

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Aug 10, 2023

I know we just inlined FormatTimeZoneOffsetString into GetOffsetStringFor, but due to rebasing #2519 I'm having to un-inline it — it'll be used in more than one place when we pre-calculate the UTC offset nanoseconds in cases where it was calculated twice.

Also includes some commits adding more structured headers that I had queued up but never submitted.

Introduces structured headers with return types for several PlainTime
abstract operations. This will make it easier to see what types are
changing when we introduce normalized time duration records.
Introduces structured headers with return types for several PlainDateTime
abstract operations. This will make it easier to see what types are
changing when we introduce normalized time duration records.
Recently the code for formatting UTC offsets with nanosecond precision was
inlined into GetOffsetStringFor because that was the only place it was
used. However, we need to use it in more than one place after the user
code audit of #2519 because we'll be pre-calculating the UTC offset in
cases where it's calculated more than once.

Specifically, in ZonedDateTime.p.getISOFields(), so change that to use the
new FormatUTCOffsetNanoseconds operation.
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #2644 (3f15714) into main (212fffc) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2644      +/-   ##
==========================================
- Coverage   96.06%   96.06%   -0.01%     
==========================================
  Files          20       20              
  Lines       11554    11553       -1     
  Branches     2195     2195              
==========================================
- Hits        11099    11098       -1     
  Misses        391      391              
  Partials       64       64              
Files Changed Coverage Δ
polyfill/lib/ecmascript.mjs 98.44% <100.00%> (-0.01%) ⬇️
polyfill/lib/zoneddatetime.mjs 100.00% <100.00%> (ø)

Copy link
Collaborator

@justingrant justingrant left a comment

Choose a reason for hiding this comment

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

we just inlined FormatTimeZoneOffsetString into GetOffsetStringFor, but due to rebasing #2519 I'm having to un-inline it

Haha, easy come, easy go! Looks good.

@Ms2ger Ms2ger merged commit c895534 into main Aug 10, 2023
9 checks passed
@Ms2ger Ms2ger deleted the editorial branch August 10, 2023 07:31
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 7, 2023
vinnydiehl pushed a commit to vinnydiehl/mozilla-unified that referenced this pull request Nov 7, 2023
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 8, 2023
…d. r=mgaudet

Implement changes from <tc39/proposal-temporal#2644>.

Differential Revision: https://phabricator.services.mozilla.com/D189773

UltraBlame original commit: 3a76318008a0748a36cdf95fad86b3f16c675963
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 8, 2023
…d. r=mgaudet

Implement changes from <tc39/proposal-temporal#2644>.

Differential Revision: https://phabricator.services.mozilla.com/D189773

UltraBlame original commit: 3a76318008a0748a36cdf95fad86b3f16c675963
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 8, 2023
…d. r=mgaudet

Implement changes from <tc39/proposal-temporal#2644>.

Differential Revision: https://phabricator.services.mozilla.com/D189773

UltraBlame original commit: 3a76318008a0748a36cdf95fad86b3f16c675963
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.

3 participants