-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
add or subtract by 'date' is not working #681
Comments
What's this add |
In doc, |
Or make |
I'll pending this issue at present. |
I found same problem. |
I just ran into this problem too. I usually manipulate only date, without time, and i have to use I read it in the docs and it seem that it will work, but, no error, no invalid date, no nothing, it just silently ignored the add call, that made me more confused and on issue hunt. |
@bogdan-nourescu thanks, removed. That's an error. |
I have same problem. tmp = new dayjs();
tmp.add(7,'d'); // don't change the date.
// but inline, that works
tmp = new dayjs().add(7, 'd') //added 7 days. |
not same. Your problem is due to dayjs is immutable. |
Describe the bug
add or subtract by 'date' is not working. by 'day' works, but then we can not use same type on all progress.
Expected behavior
add or subtract by 'date' works.
Information
The text was updated successfully, but these errors were encountered: