Skip to content

fix(date): fix birthdate#2829

Merged
ST-DDT merged 2 commits into
nextfrom
fix/date/birthdate
Apr 17, 2024
Merged

fix(date): fix birthdate#2829
ST-DDT merged 2 commits into
nextfrom
fix/date/birthdate

Conversation

@ST-DDT

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

Copy link
Copy Markdown
Member

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
@netlify

netlify Bot commented Apr 16, 2024

Copy link
Copy Markdown

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.

@codecov

codecov Bot commented Apr 16, 2024

Copy link
Copy Markdown

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
@ST-DDT ST-DDT deleted the fix/date/birthdate branch April 17, 2024 15:17
@ST-DDT ST-DDT modified the milestones: vAnytime, v9.0 Jun 22, 2026
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

4 participants