JavaScript Add and Substract Days

When I visited StackOverflow, I saw a question.

Briefly, he wants to add days to dates. Firstly I checked his codes. Also, his mathematics was wrong.

Anyway, I corrected his codes. I use VanillaJS really. You don’t need any framework or library. I wrote a code with Date object. Especially first function look like an extension of the Date object.

Actually second function unnecessary. You don’t have to use it.


For Example


Hi. I’m Ali. I’m 23. I graduated Mehmet Akif Ersoy University from CS Related Department.

I can code with all programming languages. But today I’m writing .NET and JavaScript.

You may also like...