Skip to content

Commit

Permalink
feat: add dayjs setup side effect file
Browse files Browse the repository at this point in the history
  • Loading branch information
trevor-anderson committed Feb 20, 2024
1 parent 9f78fa9 commit 39a5a14
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/app/localization/setupDayjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import "dayjs/locale/en";
import dayjs from "dayjs";
import advancedFormatDayJsPlugin from "dayjs/plugin/advancedFormat";
import isBetweenDayJsPlugin from "dayjs/plugin/isBetween";
import localizedFormatDayJsPlugin from "dayjs/plugin/localizedFormat";

// DayJS Plugins:

dayjs.extend(advancedFormatDayJsPlugin); // provides 1-24 hour format used by logger util
dayjs.extend(isBetweenDayJsPlugin); // provides isBetween() method used by Dashboard itemDataParsers
dayjs.extend(localizedFormatDayJsPlugin); // provides local date format used in CheckoutPage

0 comments on commit 39a5a14

Please sign in to comment.