mirror of https://kolaente.dev/vikunja/api.git
feat: Add helper parseKebabDatetime
This commit is contained in:
parent
878493f0ad
commit
fe104334a1
|
@ -0,0 +1,7 @@
|
|||
import {parse} from 'date-fns'
|
||||
import {DATEFNS_DATETIME_FORMAT_KEBAB} from '@/constants/date'
|
||||
import type {DatetimeKebab} from '@/types/DatetimeKebab'
|
||||
|
||||
export function parseKebabDatetime(date: DatetimeKebab): Date {
|
||||
return parse(date, DATEFNS_DATETIME_FORMAT_KEBAB, new Date())
|
||||
}
|
Loading…
Reference in New Issue