Skip to content

Commit 7e8cc87

Browse files
ioannakokarelra
andcommitted
Move ONE_MINUTE and MAX_DATE constants to module level in DateTime
Co-authored-by: Ravi <[email protected]>
1 parent a578ba1 commit 7e8cc87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotcom-rendering/src/components/DateTime.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ const formatTime = (date: Date, locale: string, timeZone: string) =>
4848
})
4949
.replace(':', '.');
5050

51+
const ONE_MINUTE = 60_000;
52+
const MAX_DATE = 8.64e15;
53+
5154
export const DateTime = ({
5255
date,
5356
showWeekday,
@@ -59,9 +62,6 @@ export const DateTime = ({
5962
const { editionId } = useConfig();
6063
const { dateLocale, timeZone } = getEditionFromId(editionId);
6164

62-
const ONE_MINUTE = 60_000;
63-
const MAX_DATE = 8.64e15;
64-
6565
/**
6666
* Server time (if set) is rounded down to the previous minute to ensure
6767
* relative times rarely go backwards. If unset we use the maximum value

0 commit comments

Comments
 (0)