Skip to content

Commit e72a6c9

Browse files
author
FalkWolsky
committed
Adding DayJS plugins by Default
1 parent ca6905f commit e72a6c9

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

client/packages/lowcoder/src/util/dateTimeUtils.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,58 @@
1+
import { time } from "console";
12
import dayjs from "dayjs";
23
import relativeTime from "dayjs/plugin/relativeTime";
4+
import timezone from "dayjs/plugin/timezone";
5+
import duration from "dayjs/plugin/duration";
6+
import utc from "dayjs/plugin/utc";
7+
import quarterOfYear from "dayjs/plugin/quarterOfYear";
8+
import weekOfYear from "dayjs/plugin/weekOfYear";
9+
import isBetween from "dayjs/plugin/isBetween";
10+
import isToday from "dayjs/plugin/isToday";
11+
import isTomorrow from "dayjs/plugin/isTomorrow";
12+
import isYesterday from "dayjs/plugin/isYesterday";
13+
import customParseFormat from "dayjs/plugin/customParseFormat";
14+
import advancedFormat from "dayjs/plugin/advancedFormat";
15+
import updateLocale from "dayjs/plugin/updateLocale";
16+
import localeData from "dayjs/plugin/localeData";
17+
import localizedFormat from "dayjs/plugin/localizedFormat";
18+
import isLeapYear from "dayjs/plugin/isLeapYear";
19+
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
20+
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
21+
import isoWeek from "dayjs/plugin/isoWeek";
22+
import isoWeeksInYear from "dayjs/plugin/isoWeeksInYear";
23+
import weekYear from "dayjs/plugin/weekYear";
24+
import isMoment from "dayjs/plugin/isMoment";
25+
import calendar from "dayjs/plugin/calendar";
26+
import buddhistEra from "dayjs/plugin/buddhistEra";
27+
import minmax from "dayjs/plugin/minMax";
28+
import relativetime from "dayjs/plugin/relativeTime";
29+
330
dayjs.extend(relativeTime);
31+
dayjs.extend(timezone);
32+
dayjs.extend(duration);
33+
dayjs.extend(utc);
34+
dayjs.extend(quarterOfYear);
35+
dayjs.extend(weekOfYear);
36+
dayjs.extend(isBetween);
37+
dayjs.extend(isToday);
38+
dayjs.extend(isTomorrow);
39+
dayjs.extend(isYesterday);
40+
dayjs.extend(customParseFormat);
41+
dayjs.extend(advancedFormat);
42+
dayjs.extend(updateLocale);
43+
dayjs.extend(localeData);
44+
dayjs.extend(localizedFormat);
45+
dayjs.extend(isLeapYear);
46+
dayjs.extend(isSameOrAfter);
47+
dayjs.extend(isSameOrBefore);
48+
dayjs.extend(isoWeek);
49+
dayjs.extend(isoWeeksInYear);
50+
dayjs.extend(weekYear);
51+
dayjs.extend(isMoment);
52+
dayjs.extend(calendar);
53+
dayjs.extend(buddhistEra);
54+
dayjs.extend(minmax);
55+
dayjs.extend(relativetime);
456

557
export const TIME_FORMAT = "HH:mm:ss";
658
export const TIME_12_FORMAT = "HH:mm:ss:a";

0 commit comments

Comments
 (0)