feat: parent child retrieval (#12106)
Signed-off-by: -LAN- <laipz8200@outlook.com> Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
12
web/utils/time.ts
Normal file
12
web/utils/time.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import dayjs, { type ConfigType } from 'dayjs'
|
||||
import utc from 'dayjs/plugin/utc'
|
||||
|
||||
dayjs.extend(utc)
|
||||
|
||||
export const isAfter = (date: ConfigType, compare: ConfigType) => {
|
||||
return dayjs(date).isAfter(dayjs(compare))
|
||||
}
|
||||
|
||||
export const formatTime = ({ date, dateFormat }: { date: ConfigType; dateFormat: string }) => {
|
||||
return dayjs(date).format(dateFormat)
|
||||
}
|
Reference in New Issue
Block a user