-
Notifications
You must be signed in to change notification settings - Fork 90
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
Auto detect first day of the week #14
base: master
Are you sure you want to change the base?
Conversation
Used weekstart package to detect sunday or monday as start of the week.
I see no changes to the date-squares, does this shift the data to the right place? |
I used this example for testing. Put it in project folder and npm run build. https://gist.github.com/nagos/4e38f883a1e9c90cee0476313e6c6dce |
nice! |
However, date-fns seems to offer a simple but (more importantly) tree-shakable method which does not introduce 4MB of new dependencies, maybe that'd be better suited? just my two cents 🙂 |
startOfWeek from date-fns gives date of first day of the week (i.e. 21 of december). And you have to provide variable weekStartsOn. |
I think this is a great lesson for me to not write half thought-through comments on PRs in the middle of the night :) Sorry for the noise. |
Is there any reason for this not to be merged? |
Would like to re-iterate this, the PR looks simple enough and there are a lot of places that would benefit from this change. https://www.timeanddate.com/calendar/days/first-day-of-the-week.html |
Upvoting for merge. Is there something blocking PR ? |
Just booping this thread, since Gitea is also waiting for this feature to be added: go-gitea/gitea#6058 |
Gitea uses Vue-3 fork |
My bad, whoops. I hope that people using this component still appreciate the boop ;) |
Used weekstart package to detect sunday or monday as start of the week.
You can check this in recent Chrome. Dev toosl-sensors-location. Change between San Francisco and London.
#1