Skip to content

Cherry release - hotfix #770

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Adding DayJS plugins by Default
  • Loading branch information
FalkWolsky committed Mar 24, 2024
commit e72a6c9c48649a9586ea2ff604ce8373c09bc663
52 changes: 52 additions & 0 deletions client/packages/lowcoder/src/util/dateTimeUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,58 @@
import { time } from "console";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import timezone from "dayjs/plugin/timezone";
import duration from "dayjs/plugin/duration";
import utc from "dayjs/plugin/utc";
import quarterOfYear from "dayjs/plugin/quarterOfYear";
import weekOfYear from "dayjs/plugin/weekOfYear";
import isBetween from "dayjs/plugin/isBetween";
import isToday from "dayjs/plugin/isToday";
import isTomorrow from "dayjs/plugin/isTomorrow";
import isYesterday from "dayjs/plugin/isYesterday";
import customParseFormat from "dayjs/plugin/customParseFormat";
import advancedFormat from "dayjs/plugin/advancedFormat";
import updateLocale from "dayjs/plugin/updateLocale";
import localeData from "dayjs/plugin/localeData";
import localizedFormat from "dayjs/plugin/localizedFormat";
import isLeapYear from "dayjs/plugin/isLeapYear";
import isSameOrAfter from "dayjs/plugin/isSameOrAfter";
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
import isoWeek from "dayjs/plugin/isoWeek";
import isoWeeksInYear from "dayjs/plugin/isoWeeksInYear";
import weekYear from "dayjs/plugin/weekYear";
import isMoment from "dayjs/plugin/isMoment";
import calendar from "dayjs/plugin/calendar";
import buddhistEra from "dayjs/plugin/buddhistEra";
import minmax from "dayjs/plugin/minMax";
import relativetime from "dayjs/plugin/relativeTime";

dayjs.extend(relativeTime);
dayjs.extend(timezone);
dayjs.extend(duration);
dayjs.extend(utc);
dayjs.extend(quarterOfYear);
dayjs.extend(weekOfYear);
dayjs.extend(isBetween);
dayjs.extend(isToday);
dayjs.extend(isTomorrow);
dayjs.extend(isYesterday);
dayjs.extend(customParseFormat);
dayjs.extend(advancedFormat);
dayjs.extend(updateLocale);
dayjs.extend(localeData);
dayjs.extend(localizedFormat);
dayjs.extend(isLeapYear);
dayjs.extend(isSameOrAfter);
dayjs.extend(isSameOrBefore);
dayjs.extend(isoWeek);
dayjs.extend(isoWeeksInYear);
dayjs.extend(weekYear);
dayjs.extend(isMoment);
dayjs.extend(calendar);
dayjs.extend(buddhistEra);
dayjs.extend(minmax);
dayjs.extend(relativetime);

export const TIME_FORMAT = "HH:mm:ss";
export const TIME_12_FORMAT = "HH:mm:ss:a";
Expand Down