Skip to content

Commit

Permalink
feat(utils): add new dayjs plugin ( isBetween)
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Jul 30, 2024
1 parent ce09d83 commit fa71cb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import 'dayjs/plugin/quarterOfYear'
import 'dayjs/plugin/timezone'
import 'dayjs/plugin/updateLocale'
import 'dayjs/plugin/utc'
import 'dayjs/plugin/isBetween'

export { GlobalStyle } from './GlobalStyle'
export { OnlyFontGlobalStyle } from './OnlyFontGlobalStyle'
Expand Down
2 changes: 2 additions & 0 deletions src/utils/customDayjs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import dayjs from 'dayjs'
import isBetween from 'dayjs/plugin/isBetween'
import isSameOrAfter from 'dayjs/plugin/isSameOrAfter'
import isSameOrBefore from 'dayjs/plugin/isSameOrBefore'
import localeData from 'dayjs/plugin/localeData'
Expand All @@ -16,6 +17,7 @@ dayjs.extend(quarterOfYear)
dayjs.extend(timezone)
dayjs.extend(updateLocale)
dayjs.extend(utc)
dayjs.extend(isBetween)

dayjs.locale('fr')

Expand Down

0 comments on commit fa71cb0

Please sign in to comment.