Daily Archives: July 20, 2017

1 post

How to add days, months, and years to a date in JavaScript

Several years ago I wrote a post about how to add days, months, and years in JavaScript, and it was a quick-and-dirty workaround for a project and I didn’t pay much attention to value checking when writing the JavaScript function. For example, if the old date is 07/19/2017 and you need to know what date it is after adding 25 days, the JavaScript function will throw an error because 07/44/2017 is not a valid date […]