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

Feat: multi add function to add multiple parts of a date #1427

Closed
benneq opened this issue Sep 17, 2019 · 6 comments · Fixed by #1581
Closed

Feat: multi add function to add multiple parts of a date #1427

benneq opened this issue Sep 17, 2019 · 6 comments · Fixed by #1581

Comments

@benneq
Copy link

benneq commented Sep 17, 2019

Similar to #1388 (which was implemented by @sneakyfish5 in #1398 ), it would be nice to have a function, that can add multiple values at once.

So instead of doing this:

addSeconds(addMinutes(addHours(myDate, 12), 12), 12);

Something like this would be nice:

add(myDate, { hours: 12, minutes: 12, seconds: 12 });
@alaskaa
Copy link

alaskaa commented Oct 1, 2019

Hi! 👋

I'm looking to contribute to date-fns as I really love the library and use it all the time!

I've seen this and thought it would be relatively easy to implement, if we provide a multi-add function that would make OPs function calls in the background. Could I claim this and find a way to implement it?

@leshakoss
Copy link
Contributor

@alaskaa sure! Just add "Claimed" label and assign yourself to the issue. Thanks a lot!

@alaskaa
Copy link

alaskaa commented Oct 2, 2019

I'm not a member of the organisation, I've tried to add the Claimed label and assign myself but it won't let me.

Just consider me working on the issue and maybe if one of you ever has time to update the issue, you could add it for me!

@Anshuman71
Copy link
Contributor

@alaskaa what's the status on this issue? I would love to help, is there anything I can help with?

@alaskaa
Copy link

alaskaa commented Oct 25, 2019

Unfortunately, I've fallen a bit ill and have had a operation, hence I've had no time to really work on this yet. I'd love to still give this a shot, but I might not be able to for a while as I'm still on the road to recovery. So if there's an urge to get it done soon, I'm happy for you to take it over!

@Anshuman71
Copy link
Contributor

Anshuman71 commented Oct 25, 2019

Unfortunately, I've fallen a bit ill and have had a operation, hence I've had no time to really work on this yet. I'd love to still give this a shot, but I might not be able to for a while as I'm still on the road to recovery. So if there's an urge to get it done soon, I'm happy for you to take it over!

Oh, sorry to hear that. Get well soon. Let me try to get something done on it and will add you to the reviewer so you can help with that

Update @leshakoss @alaskaa @dkozickis can you please review the PR #1504 for this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants