Skip to content

feat(date): add ability to provide date range for recent and soon#3844

Merged
xDivisionByZerox merged 1 commit intonextfrom
feat/date/day-range
May 10, 2026
Merged

feat(date): add ability to provide date range for recent and soon#3844
xDivisionByZerox merged 1 commit intonextfrom
feat/date/day-range

Conversation

@ST-DDT
Copy link
Copy Markdown
Member

@ST-DDT ST-DDT commented May 6, 2026

Continuation of #3653 and #3783


Extend date.recent and date.soons' days option to support ranges.

faker.date.recent({ days: { min: 4, max: 7 } }) // '2026-04-30T13:17:16.910Z'
faker.date.soon({ days: { min: 4, max: 7 } }) // '2026-05-11T01:14:05.068Z'
$ pnpm run docs:diff
Documentation changes detected:
- Date
  - recent
  - soon

Preview

@ST-DDT ST-DDT added this to the v10.x milestone May 6, 2026
@ST-DDT ST-DDT self-assigned this May 6, 2026
@ST-DDT ST-DDT requested a review from a team as a code owner May 6, 2026 21:45
@ST-DDT ST-DDT added c: feature Request for new feature p: 1-normal Nothing urgent m: date Something is referring to the date module labels May 6, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented May 6, 2026

Deploy Preview for fakerjs ready!

Name Link
🔨 Latest commit 65ed93f
🔍 Latest deploy log https://app.netlify.com/projects/fakerjs/deploys/69fbb66b05388300086afe27
😎 Deploy Preview https://deploy-preview-3844.fakerjs.dev
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@ST-DDT
Copy link
Copy Markdown
Member Author

ST-DDT commented May 6, 2026

@xDivisionByZerox Sorry, I have seen to late, that you wanted to do this change yourself.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.91%. Comparing base (50a5ec9) to head (65ed93f).

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #3844   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files         901      901           
  Lines        3121     3139   +18     
  Branches      574      564   -10     
=======================================
+ Hits         3087     3105   +18     
  Misses         30       30           
  Partials        4        4           
Files with missing lines Coverage Δ
src/modules/date/index.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@xDivisionByZerox
Copy link
Copy Markdown
Member

@xDivisionByZerox Sorry, I have seen to late, that you wanted to do this change yourself.

All good @ST-DDT. I did not have that much time for OSS during the last weeks. Bringing the project forward is more important than satisfying someones ego ^^

Copy link
Copy Markdown
Member

@xDivisionByZerox xDivisionByZerox left a comment

Choose a reason for hiding this comment

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

Look good 👍

@xDivisionByZerox xDivisionByZerox added this pull request to the merge queue May 10, 2026
Merged via the queue into next with commit 0bc038d May 10, 2026
26 checks passed
@xDivisionByZerox xDivisionByZerox deleted the feat/date/day-range branch May 10, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: feature Request for new feature 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.

3 participants