(time?: Date | string | number)
| 32 | * @param time |
| 33 | */ |
| 34 | export function getDate(time?: Date | string | number) { |
| 35 | if (!time) return undefined |
| 36 | if (time instanceof Date) return time |
| 37 | if (typeof time === 'string') { |
| 38 | return dayjs(time).toDate() |
| 39 | } |
| 40 | return new Date(time) |
| 41 | } |
| 42 | |
| 43 | export const getBrowserLocale = () => { |
| 44 | const language = navigator.language |
no outgoing calls
no test coverage detected