This commit is contained in:
2024-05-21 00:12:19 +02:00
parent 9e0466f78b
commit 963987278a
22 changed files with 1025 additions and 90 deletions

View File

@@ -1,10 +1,11 @@
import { isToday, isAfter, parse } from "date-fns";
import { nb } from "date-fns/locale";
import { toZonedTime, format} from "date-fns-tz";
import { toZonedTime, format } from "date-fns-tz";
const timeZone = "Europe/Oslo";
export const commonDateFormat = "dd.MM.yyyy 'kl.' HH:mm";
export const commonDateTimeFormat = "dd.MM.yyyy 'kl.' HH:mm";
export const commonDateFormat = "dd.MM.yyyy";
export function toLocalTime(date: Date | string | number) {
return toZonedTime(date, timeZone);