{"version":3,"file":"date-utils.mjs","sources":["../../../../../../../packages/components/cron-expression-builder/src/config/date-utils.ts"],"sourcesContent":["/**\r\n * Independent time operation tool to facilitate subsequent switch to dayjs\r\n */\r\nimport dayjs from 'dayjs'\r\n\r\nconst DATE_TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss'\r\nconst DATE_FORMAT = 'YYYY-MM-DD'\r\n\r\nexport type FormatDate = dayjs.ConfigType\r\n\r\nexport function formatToDateTime(\r\n  date: dayjs.ConfigType = undefined,\r\n  format = DATE_TIME_FORMAT\r\n): string {\r\n  return dayjs(date).format(format)\r\n}\r\n\r\nexport function formatToDate(\r\n  date: dayjs.ConfigType = undefined,\r\n  format = DATE_FORMAT\r\n): string {\r\n  return dayjs(date).format(format)\r\n}\r\n\r\nexport const dateUtil = dayjs\r\n"],"names":[],"mappings":";;;AAKA,MAAM,gBAAA,GAAmB,qBAAA;AACzB,MAAM,WAAA,GAAc,YAAA;AAIb,SAAS,gBAAA,CACd,IAAA,GAAyB,KAAA,CAAA,EACzB,MAAA,GAAS,gBAAA,EACD;AACR,EAAA,OAAO,KAAA,CAAM,IAAI,CAAA,CAAE,MAAA,CAAO,MAAM,CAAA;AAClC;AAEO,SAAS,YAAA,CACd,IAAA,GAAyB,KAAA,CAAA,EACzB,MAAA,GAAS,WAAA,EACD;AACR,EAAA,OAAO,KAAA,CAAM,IAAI,CAAA,CAAE,MAAA,CAAO,MAAM,CAAA;AAClC;AAEO,MAAM,QAAA,GAAW;;;;"}