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

week使用没有到达预期效果,看起来可能是个bug #2021

Open
zhangqh22 opened this issue Aug 9, 2022 · 3 comments
Open

week使用没有到达预期效果,看起来可能是个bug #2021

zhangqh22 opened this issue Aug 9, 2022 · 3 comments

Comments

@zhangqh22
Copy link

取week的时候,日期错误,例如dayjs().week(1),结果错误
dayjs("2022-8-8").week(1).format("YYYY-MM-DD") //2021-12-27
dayjs("2022-8-9").week(1).format("YYYY-MM-DD") //2021-12-28

@Bykiev
Copy link

Bykiev commented Aug 9, 2022

Hi, week() function is locale specific, so you should import your locale before. Here is a demo with Russian locale.

@iamkun
Copy link
Owner

iamkun commented Aug 17, 2022

@zhangqh22 please refer to @Bykiev 's explanation

@zhangqh22
Copy link
Author

多谢,thank you too much

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

3 participants