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

dayjs(input, format).valueOf() result is wrong #2618

Open
Liao-js opened this issue Mar 29, 2024 · 0 comments
Open

dayjs(input, format).valueOf() result is wrong #2618

Liao-js opened this issue Mar 29, 2024 · 0 comments

Comments

@Liao-js
Copy link

Liao-js commented Mar 29, 2024

Describe the bug

import dayjs from "dayjs";

const input = '2024/3/9 0:00:00'
const format = 'YYYY-MM-DD'
dayjs(input, format).valueOf()  // 1704038400000
dayjs(input, format, false).valueOf()  // 1704038400000

Expected behavior
dayjs(input, format).valueOf() should be 1709913600000

Information

  • Day.js Version 1.11.10
  • OS: window11
  • Browser Chrome 123.0.6312.60
  • My Computer time zone: (UTC+08:00) Asia/China
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

1 participant