mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-10-14 16:53:17 +01:00
add timesheets page
This commit is contained in:
@@ -8,6 +8,20 @@ export function getWeekStart() {
|
||||
}
|
||||
return weekStart;
|
||||
}
|
||||
|
||||
const weekStartMap: Record<string, number> = {
|
||||
sunday: 0,
|
||||
monday: 1,
|
||||
tuesday: 2,
|
||||
wednesday: 3,
|
||||
thursday: 4,
|
||||
friday: 5,
|
||||
saturday: 6,
|
||||
};
|
||||
|
||||
export function getWeekStartDayNumber(): number {
|
||||
return weekStartMap[getWeekStart()] ?? 1;
|
||||
}
|
||||
export function getUserTimezone() {
|
||||
const timezone = window?.getTimezoneSetting() as string;
|
||||
if (!timezone) {
|
||||
|
||||
Reference in New Issue
Block a user