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

startOf('week') and startOf('isoWeek') not expected result #693

Closed
dominictobias opened this issue Oct 11, 2019 · 3 comments
Closed

startOf('week') and startOf('isoWeek') not expected result #693

dominictobias opened this issue Oct 11, 2019 · 3 comments

Comments

@dominictobias
Copy link

dominictobias commented Oct 11, 2019

Describe the bug
Hi there seem to be two bugs relating to this feature:

  1. start of week (non ISO) starts on Saturday instead of Sunday
  2. there seems to be no support for isoWeek

Expected behavior
Here is the expected value in moment vs what we get in dayjs:

https://codesandbox.io/s/dayjs-unexpected-startof-week-syph3

I'm aware there is a dayjs-plugin-utc plugin. All the same using utc() has no effect on the issue except that it makes week incorrectly get set to Sunday instead of Monday (looks like week is one day out either way). Does dayjs not intend to have any ISO stuff in the core? Thanks

Information

  • Day.js Version [e.g. v1.0.0] - 1.8.16
  • Time zone: GMT+0100 (British Summer Time)
@iamkun
Copy link
Owner

iamkun commented Oct 16, 2019

1 we have our official utc plugin
2 isoWeek is not supported at the moment

@dominictobias
Copy link
Author

Ok thanks didn’t realise I wasn’t using the official one

@iamkun
Copy link
Owner

iamkun commented Mar 2, 2020

add support isoWeek #811

Check isoWeek here https://day.js.org/docs/en/get-set/iso-week

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