question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

set default start day of week to saturday problem

See original GitHub issue

What 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:open
  • Created 2 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
pdanpdancommented, Mar 14, 2022

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?

0reactions
AlaaDqcommented, Mar 14, 2022

That is what I was need actually Because in Asia the week start from Saturday not Sunday 😁

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found