mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 02:32:15 +01:00
20 lines
570 B
TypeScript
20 lines
570 B
TypeScript
export function getWeekStart() {
|
|
const weekStart = window?.getWeekStartSetting() as string;
|
|
|
|
if (!weekStart) {
|
|
throw new Error(
|
|
'Please make sure to provide the current user week start setting as a vue inject (week_start)'
|
|
);
|
|
}
|
|
return weekStart;
|
|
}
|
|
export function getUserTimezone() {
|
|
const timezone = window?.getTimezoneSetting() as string;
|
|
if (!timezone) {
|
|
throw new Error(
|
|
'Please make sure to provide the current user timezone as a vue inject (timezone)'
|
|
);
|
|
}
|
|
return timezone;
|
|
}
|