set default start day of week to saturday problem
See original GitHub issueWhat happened?
import { date } from ‘quasar’;
date.getDayOfWeek(new Date()) return sunday even when i set the default to saturday in boot file like below
const lang = await import('quasar/lang/' + locale.isoName);
lang.default.date = { ...lang.default.date, firstDayOfWeek: 6 };
What did you expect to happen?
return current saturday instead of sunday
Reproduction URL
.
How to reproduce?
overwrite default lang-pack to has first day as
const lang = await import('quasar/lang/' + locale.isoName);
lang.default.date = { ...lang.default.date, firstDayOfWeek: 6 };
Flavour
Quasar CLI (@quasar/cli | @quasar/app)
Areas
Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app), Quasar Extras (@quasar/extras)
Platforms/Browsers
Chrome
Quasar info output
No response
Relevant log output
No response
Additional context
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Set the first day of the calendar week and change calendar ...
By default, the work week is defined as Monday through Friday with a work day of 9 A.M. to 5 P.M. The first...
Read more >Hi, I want to know how to set the default start day of the week ...
Hi, I want to know how to set the default start day of the week. Currently, the week is set to Mon-Sun. I...
Read more >Change the week start day from Monday to Saturday
When the day is a Monday the above returns "The number of the weekday is: 1". This is because the week starts on...
Read more >How to set the first day of the week in System tray calendar?
Right-click on the Taskbar Clock area. Choose Adjust date/time · It opens a dialog, with a Formats section, where there is a display-only...
Read more >Custom week starting day | Power BI Exchange
How to set the first day of the week. ... WEEKDAY ('Date' [Date]) the default format is used, in which 1 is Sunday...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, I’ve checked the code. I’m not very sure which is the point of how it works, because it does not match the getDay behaviour and it does not count using the defined start of week day.
What it does now: it returns
getDay
value except for Sunday for which it returns 7.@rstoenescu Should we change it to return the 1-indexed position of the day in the week as defined by the locale?
That is what I was need actually Because in Asia the week start from Saturday not Sunday 😁