Skip to content
This repository has been archived by the owner on Jul 16, 2022. It is now read-only.

AddMonths bug #57

Closed
Nadoedalo opened this issue Feb 17, 2015 · 1 comment
Closed

AddMonths bug #57

Nadoedalo opened this issue Feb 17, 2015 · 1 comment

Comments

@Nadoedalo
Copy link

You can't chain-call the addMonths, i.e new Date().addMonths(1).addDays(-1) because addMonths returns undefined.
Those functions should return the result(i.e , not only modify the actual date but also return that date object).

Maybe return this; will help

@nazar-pc
Copy link
Owner

Why should they?
They behave just like native methods of Date object, native methods doesn't support chaining as well.

@nazar-pc nazar-pc closed this as completed Mar 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants