You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. }