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) or subtract(Duration) in version v1.11.9 is invalid. #2425

Open
mlkt opened this issue Aug 24, 2023 · 2 comments · May be fixed by #2426
Open

add(Duration) or subtract(Duration) in version v1.11.9 is invalid. #2425

mlkt opened this issue Aug 24, 2023 · 2 comments · May be fixed by #2426

Comments

@mlkt
Copy link

mlkt commented Aug 24, 2023

import dayjs from "dayjs";
import duration from "dayjs/plugin/duration";

dayjs.extend(duration);

let time = dayjs();
const du = dayjs.duration({ milliseconds: 123 });
time = time.add(du);
console.log(time);  //<-- Invalid Date !!!!!!!!!

time.add(dayjs.duration({ milliseconds: 123 })) in version v1.11.9 does not work, and it works normally in version v1.11.8

@mlkt mlkt changed the title The Duration in version v1.11.9 is invalid. add(Duration) or subtract(Duration) in version v1.11.9 is invalid. Aug 24, 2023
mlkt added a commit to mlkt/dayjs that referenced this issue Aug 24, 2023
@mlkt mlkt linked a pull request Aug 24, 2023 that will close this issue
mlkt added a commit to mlkt/dayjs that referenced this issue Sep 19, 2023
@blupibh
Copy link

blupibh commented Sep 20, 2023

+1 o(╥﹏╥)o

@iamkun
Copy link
Owner

iamkun commented Sep 20, 2023

should have been fixed in the latest version 1.11.10 via #2369

mlkt added a commit to mlkt/dayjs that referenced this issue Sep 23, 2023
mlkt added a commit to mlkt/dayjs that referenced this issue Sep 23, 2023
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

Successfully merging a pull request may close this issue.

3 participants