daysj
This commit is contained in:
parent
fa4b956698
commit
d9c2b3580e
5 changed files with 41 additions and 40 deletions
43
src/dayjs.ts
43
src/dayjs.ts
|
|
@ -1,26 +1,27 @@
|
|||
import dayjs from "dayjs"
|
||||
|
||||
const dayjsbr = dayjs
|
||||
|
||||
export type { ManipulateType } from "dayjs"
|
||||
import "dayjs/locale/pt-br"
|
||||
import * as duration from "dayjs/plugin/duration"
|
||||
import * as isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||
import * as isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||
import * as minMax from "dayjs/plugin/minMax"
|
||||
import * as relativeTime from "dayjs/plugin/relativeTime"
|
||||
import * as timezone from "dayjs/plugin/timezone"
|
||||
import * as utc from "dayjs/plugin/utc"
|
||||
import * as weekOfYear from "dayjs/plugin/weekOfYear"
|
||||
|
||||
dayjsbr.extend(utc.default)
|
||||
dayjsbr.extend(timezone.default)
|
||||
dayjsbr.extend(weekOfYear.default)
|
||||
dayjsbr.extend(isSameOrBefore.default)
|
||||
dayjsbr.extend(isSameOrAfter.default)
|
||||
dayjsbr.extend(minMax.default)
|
||||
dayjsbr.extend(relativeTime.default)
|
||||
dayjsbr.extend(duration.default)
|
||||
dayjsbr.locale("pt-br")
|
||||
import duration from "dayjs/plugin/duration"
|
||||
import isSameOrAfter from "dayjs/plugin/isSameOrAfter"
|
||||
import isSameOrBefore from "dayjs/plugin/isSameOrBefore"
|
||||
import minMax from "dayjs/plugin/minMax"
|
||||
import relativeTime from "dayjs/plugin/relativeTime"
|
||||
import timezone from "dayjs/plugin/timezone"
|
||||
import utc from "dayjs/plugin/utc"
|
||||
import weekOfYear from "dayjs/plugin/weekOfYear"
|
||||
|
||||
export { dayjsbr, dayjs }
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
dayjs.extend(weekOfYear)
|
||||
dayjs.extend(isSameOrBefore)
|
||||
dayjs.extend(isSameOrAfter)
|
||||
dayjs.extend(minMax)
|
||||
dayjs.extend(relativeTime)
|
||||
dayjs.extend(duration)
|
||||
|
||||
dayjs.locale("pt-br")
|
||||
|
||||
export const dayjsbr = dayjs
|
||||
export { dayjs }
|
||||
export type { ManipulateType } from "dayjs"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue