-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.0.0-beta-3
- Loading branch information
Showing
58 changed files
with
5,235 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/app/_main/components/sidebar-navigation/sidebar-navigation.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
src/app/_main/libs/localization/weekdays.localization.lib.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import * as dayjs from 'dayjs'; | ||
|
||
export function weekdays() { | ||
const localeData = dayjs.localeData(); | ||
|
||
const firstDayOfWeek = localeData.firstDayOfWeek(); | ||
const weekdays = localeData.weekdays(); | ||
|
||
for (let i = 0; i < firstDayOfWeek; i++) { | ||
weekdays.push(weekdays.shift()!); | ||
} | ||
|
||
return weekdays; | ||
} | ||
|
||
export function weekdaysShort() { | ||
const localeData = dayjs.localeData(); | ||
|
||
const firstDayOfWeek = localeData.firstDayOfWeek(); | ||
const weekdaysShort = [...localeData.weekdaysShort()]; | ||
|
||
for (let i = 0; i < firstDayOfWeek; i++) { | ||
weekdaysShort.push(weekdaysShort.shift()!); | ||
} | ||
|
||
console.log(weekdaysShort); | ||
return weekdaysShort; | ||
} |
Oops, something went wrong.