Last active
February 4, 2023 10:48
dayjs config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dayjs/locale/ru'; | |
import customParseFormat from 'dayjs/plugin/customParseFormat'; | |
import dayjs from 'dayjs'; | |
import dayOfYear from 'dayjs/plugin/dayOfYear'; | |
import devHelper from 'dayjs/plugin/devHelper'; | |
import duration from 'dayjs/plugin/duration'; | |
import type { Duration } from 'dayjs/plugin/duration'; | |
import isoWeek from 'dayjs/plugin/isoWeek'; | |
import relativeTime from 'dayjs/plugin/relativeTime'; | |
import toObject from 'dayjs/plugin/toObject'; | |
import utc from 'dayjs/plugin/utc'; | |
import weekday from 'dayjs/plugin/weekday'; | |
import { isDev } from './const'; | |
dayjs.locale('ru'); | |
dayjs.extend(relativeTime); | |
dayjs.extend(customParseFormat); | |
dayjs.extend(dayOfYear); | |
dayjs.extend(isoWeek); | |
dayjs.extend(weekday); | |
dayjs.extend(duration); | |
dayjs.extend(toObject); | |
dayjs.extend(utc); | |
if (isDev) { | |
dayjs.extend(devHelper); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment