Skip to content

Conversation

@justingrant
Copy link
Collaborator

Works around https://bugzilla.mozilla.org/show_bug.cgi?id=1752253 by allowing either 'a' or 'ad' for the CE era and 'b' or 'bc' for the BCE era.

This bug only occurs with Firefox and our tests don't use FF, so there wasn't any way to add a test for it. But I did verify it on the docs playground and it works great in FF 97.

Fixes #2020.

@codecov
Copy link

codecov bot commented Feb 4, 2022

Codecov Report

Merging #2033 (47e48d9) into main (ad37d6e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #2033   +/-   ##
=======================================
  Coverage   94.44%   94.45%           
=======================================
  Files          19       19           
  Lines       10989    10993    +4     
  Branches     1596     1597    +1     
=======================================
+ Hits        10379    10383    +4     
  Misses        590      590           
  Partials       20       20           
Flag Coverage Δ
test262 81.19% <0.00%> (ø)
tests 88.74% <66.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
polyfill/lib/calendar.mjs 94.32% <100.00%> (+0.01%) ⬆️

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 ad37d6e...47e48d9. Read the comment docs.

@ljharb
Copy link
Member

ljharb commented Feb 4, 2022

Do the existing tests cover it, if they were run in firefox?

@justingrant justingrant changed the title Work around Firefox bug wtih Gregory era names Work around Firefox bug with 'gregory' calendar era names Feb 4, 2022
@justingrant justingrant added no-spec-text PR can be ignored by implementors non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE! labels Feb 4, 2022
@justingrant justingrant requested review from Ms2ger and ptomato February 4, 2022 06:37
@justingrant
Copy link
Collaborator Author

Do the existing tests cover it, if they were run in firefox?

Yes. There would be massive failures all over the place because this bug prevents the 'gregory' calendar from working in most use cases.

Copy link
Collaborator

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

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

Ah, I hit that somewhere. Thanks for figuring it out!

@Ms2ger Ms2ger merged commit a43fafd into tc39:main Feb 4, 2022
justingrant added a commit to justingrant/temporal-polyfill that referenced this pull request Feb 4, 2022
justingrant added a commit to js-temporal/temporal-polyfill that referenced this pull request Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-spec-text PR can be ignored by implementors non-prod-polyfill THIS POLYFILL IS NOT FOR PRODUCTION USE!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The 'gregory' calendar gives a Era error

3 participants