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 step to eachDay function #487

Merged
merged 4 commits into from Jul 28, 2017

Conversation

@BDav24
Copy link

commented May 12, 2017

Hi, do you think this option would be useful?

@BDav24 BDav24 force-pushed the BDav24:master branch from e1cb96a to 9b04b03 May 12, 2017

@BDav24 BDav24 force-pushed the BDav24:master branch from 9b04b03 to e12198e May 12, 2017

@kossnocorp
Copy link
Member

left a comment

@BDav24 I like the idea it's differently useful!

Now when v2 branch is merged your branch and code is out date 😩
Also, there are a couple of things that I think needs to be done before merge:

  • With v2 each function accepts options object: https://github.com/date-fns/date-fns/blob/master/docs/Options.js. It makes sense to add step to it. In the future, we may implement eachHour, eachSecond, etc. function so this option will be useful there as well 👍.

  • The option must check step for being a positive number otherwise it could lead to infinite loop, so we need to throw TypeError otherwise.

@BDav24

This comment has been minimized.

Copy link
Author

commented Jul 14, 2017

Hi @kossnocorp, may I let you merge this feature then? Given the low complexity, you will go a lot faster than I would, setting up the whole env ;)

@kossnocorp kossnocorp added the 👴 v1 label Jul 28, 2017

@kossnocorp kossnocorp changed the base branch from master to v1 Jul 28, 2017

@kossnocorp

This comment has been minimized.

Copy link
Member

commented Jul 28, 2017

Okay! My plan is to merge and release it to v1 and then backport to v2. I'll ping once it's released.

@kossnocorp kossnocorp merged commit c38db25 into date-fns:v1 Jul 28, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
kossnocorp added a commit that referenced this pull request Jul 28, 2017
kossnocorp added a commit that referenced this pull request Dec 11, 2018
Add step option to eachDayOfInterval
Backport the feature introduced in #487
kossnocorp added a commit that referenced this pull request Dec 11, 2018
Add step option to eachDayOfInterval (#1008)
Backport the feature introduced in #487
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.