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

fix(date): fix birthdate #2829

Merged
merged 2 commits into from
Apr 17, 2024
Merged

fix(date): fix birthdate #2829

merged 2 commits into from
Apr 17, 2024

Conversation

ST-DDT
Copy link
Member

@ST-DDT ST-DDT commented Apr 16, 2024

Fixes #2783

There are actually two errors:

  • One where it is possible to generate the exact same date as the refDate (aka 2020-03-31 and 2000-03-31 for age 20)
  • The other lies in the test, where the age is calculated wrongly if the refDate is within a leap year and after Feb 29

@ST-DDT ST-DDT added c: bug Something isn't working p: 1-normal Nothing urgent c: test m: date Something is referring to the date module labels Apr 16, 2024
@ST-DDT ST-DDT added this to the vAnytime milestone Apr 16, 2024
@ST-DDT ST-DDT requested review from a team April 16, 2024 19:35
@ST-DDT ST-DDT self-assigned this Apr 16, 2024
Copy link

netlify bot commented Apr 16, 2024

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 600173d
🔍 Latest deploy log https://app.netlify.com/sites/fakerjs/deploys/661fe4e39c7c790008f3e66d
😎 Deploy Preview https://deploy-preview-2829.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Apr 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.95%. Comparing base (0fe5af8) to head (600173d).

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2829      +/-   ##
==========================================
- Coverage   99.95%   99.95%   -0.01%     
==========================================
  Files        2964     2964              
  Lines      212541   212544       +3     
  Branches      600      597       -3     
==========================================
+ Hits       212455   212457       +2     
- Misses         86       87       +1     
Files Coverage Δ
src/modules/date/index.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@ST-DDT ST-DDT requested a review from a team April 17, 2024 05:26
@ST-DDT ST-DDT enabled auto-merge (squash) April 17, 2024 15:04
@ST-DDT ST-DDT merged commit 462c80e into next Apr 17, 2024
20 checks passed
@ST-DDT ST-DDT deleted the fix/date/birthdate branch April 17, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: bug Something isn't working c: test m: date Something is referring to the date module p: 1-normal Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Random CI test failure in date.birthdate for specific age
4 participants