MCPcopy Index your code
hub / github.com/dataease/SQLBot / getDate

Function getDate

frontend/src/utils/utils.ts:34–41  ·  view source on GitHub ↗
(time?: Date | string | number)

Source from the content-addressed store, hash-verified

32 * @param time
33 */
34export 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
43export const getBrowserLocale = () => {
44 const language = navigator.language

Callers 5

constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected