question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

add/sub method: Add/Subtract the specified weeks to the given date.

See original GitHub issue

In the add function, can we also add specified weeks like

add(new Date(), { weeks: 6 })

Similarly for sub method.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
kossnocorpcommented, Jan 10, 2020

Closed by #1592

1reaction
kossnocorpcommented, Jan 9, 2020

You’re right, as they present in ISO 8601’s durations we also should add them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# DateTime to Add/Subtract Working Days - Stack Overflow
Based on Taz's link: public static class DateTimeExtensions { public static DateTime AddWorkDays(this DateTime date, int workingDays) { int ...
Read more >
Add or subtract dates in Excel for Mac - Microsoft Support
This formula adds 1 year, 7 months, and 5 days to 6/9/2012, for a result of 1/14/2014. In each formula, a specified number...
Read more >
A simple PHP API extension for DateTime. - Carbon
Carbon - A simple PHP API extension for DateTime.
Read more >
How to Add/Subtract Time Period to Date Object in Javascript
We can use above methods to add/subtract a given time period to/from a date instance ... Adds specified time period in minutes to...
Read more >
Java Add/subtract years, months, days, hours, minutes, or ...
In this article, you'll find several ways of adding or subtracting years, months, days, hours, minutes, or seconds to a Date in Java....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found