Skip to content
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 duration not working anymore #2495

Open
afillatre opened this issue Oct 29, 2023 · 1 comment
Open

Add duration not working anymore #2495

afillatre opened this issue Oct 29, 2023 · 1 comment

Comments

@afillatre
Copy link

Describe the bug
In the following code:

  const duration = dayjs.duration({ weeks: 1 });
  const initialDate = dayjs(date);
  const result = initialDate.add(duration);

initialDate and result resolve to the same date.

This happened after upgrading from dayjs 1.11.8 to 1.11.9 or 1.11.10

Expected behavior
The result date is correctly calculated

Information

  • Day.js Version [1.11.9+]
  • OS: [OS X 14.0]-
  • Time zone: [GMT+1]
@TonyRL
Copy link

TonyRL commented Nov 6, 2023

#2464 #2479

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants