您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112
  1. import dayjs, { type ConfigType } from 'dayjs'
  2. import utc from 'dayjs/plugin/utc'
  3. dayjs.extend(utc)
  4. export const isAfter = (date: ConfigType, compare: ConfigType) => {
  5. return dayjs(date).isAfter(dayjs(compare))
  6. }
  7. export const formatTime = ({ date, dateFormat }: { date: ConfigType; dateFormat: string }) => {
  8. return dayjs(date).format(dateFormat)
  9. }