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

Add rounding to Date.difference and YearMonth.difference #982

Merged
merged 3 commits into from
Oct 14, 2020

Conversation

ptomato
Copy link
Collaborator

@ptomato ptomato commented Oct 13, 2020

See: #908

I missed this one before because it wasn't in the spec yet (since we don't
delegate to the calendar yet in DateTime.difference).
We don't have Date.round because calendar rounding needs a reference
point, but in Date.difference we have a reference point (`this`).

See: #908
For the same reason as we can add it to Date.difference, `this` is used as
the reference point.

See: #908
@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #982 into main will increase coverage by 0.07%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #982      +/-   ##
==========================================
+ Coverage   94.24%   94.32%   +0.07%     
==========================================
  Files          18       18              
  Lines        6118     6201      +83     
  Branches      912      912              
==========================================
+ Hits         5766     5849      +83     
  Misses        345      345              
  Partials        7        7              
Flag Coverage Δ
#test262 46.82% <0.00%> (-0.42%) ⬇️
#tests 90.18% <100.00%> (+0.13%) ⬆️

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

Impacted Files Coverage Δ
polyfill/lib/date.mjs 92.46% <100.00%> (+1.18%) ⬆️
polyfill/lib/datetime.mjs 95.55% <100.00%> (-0.02%) ⬇️
polyfill/lib/yearmonth.mjs 95.83% <100.00%> (+0.69%) ⬆️

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 0271366...5a4ef33. Read the comment docs.

@Ms2ger Ms2ger merged commit 7b36278 into main Oct 14, 2020
@Ms2ger Ms2ger deleted the 908-date-yearmonth-difference-rounding branch October 14, 2020 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants