@@ -1,4 +1,4 @@
|
||||
import { CalendarStartDay } from '@/localization/constants/CalendarStartDay';
|
||||
import { type CalendarStartDay } from '@/localization/constants/CalendarStartDay';
|
||||
|
||||
const MONDAY_KEY: keyof typeof CalendarStartDay = 'MONDAY';
|
||||
const SATURDAY_KEY: keyof typeof CalendarStartDay = 'SATURDAY';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateFormat } from '@/localization/constants/DateFormat';
|
||||
import { type DateFormat } from '@/localization/constants/DateFormat';
|
||||
|
||||
export const detectDateFormat = (): keyof typeof DateFormat => {
|
||||
const date = new Date();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { TimeFormat } from '@/localization/constants/TimeFormat';
|
||||
import { type TimeFormat } from '@/localization/constants/TimeFormat';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
|
||||
export const detectTimeFormat = (): keyof typeof TimeFormat => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { DateFormat } from '@/localization/constants/DateFormat';
|
||||
import { type DateFormat } from '@/localization/constants/DateFormat';
|
||||
import { formatInTimeZone } from 'date-fns-tz';
|
||||
|
||||
export const formatDateISOStringToDate = ({
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
import { DateFormat } from '@/localization/constants/DateFormat';
|
||||
import { TimeFormat } from '@/localization/constants/TimeFormat';
|
||||
import { type DateFormat } from '@/localization/constants/DateFormat';
|
||||
import { type TimeFormat } from '@/localization/constants/TimeFormat';
|
||||
import { formatInTimeZone } from 'date-fns-tz';
|
||||
|
||||
export const formatDateISOStringToDateTime = ({
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { DATE_FORMAT_WITHOUT_YEAR } from '@/localization/constants/DateFormatWithoutYear';
|
||||
import { TimeFormat } from '@/localization/constants/TimeFormat';
|
||||
import { type TimeFormat } from '@/localization/constants/TimeFormat';
|
||||
import { detectDateFormat } from '@/localization/utils/detectDateFormat';
|
||||
import { formatInTimeZone } from 'date-fns-tz';
|
||||
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import {
|
||||
isToday,
|
||||
isTomorrow,
|
||||
isYesterday,
|
||||
Locale,
|
||||
type Locale,
|
||||
startOfDay,
|
||||
} from 'date-fns';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user