element-plus
Version:
A Component Library for Vue 3
1 lines • 799 B
Source Map (JSON)
{"version":3,"file":"date-utils.mjs","sources":["../../../../../../../packages/components/time-picker/src/common/date-utils.ts"],"sourcesContent":["export const rangeArr = (n) => {\n return Array.from(Array(n).keys())\n}\n\nexport const extractDateFormat = (format: string) => {\n return format\n .replace(/\\W?m{1,2}|\\W?ZZ/g, '')\n .replace(/\\W?h{1,2}|\\W?s{1,3}|\\W?a/gi, '')\n .trim()\n}\n\nexport const extractTimeFormat = (format: string) => {\n return format\n .replace(/\\W?D{1,2}|\\W?Do|\\W?d{1,4}|\\W?M{1,4}|\\W?Y{2,4}/g, '')\n .trim()\n}\n"],"names":[],"mappings":"MAAa,WAAW,CAAC,MAAM;AAC7B,SAAO,MAAM,KAAK,MAAM,GAAG;AAAA;MAGhB,oBAAoB,CAAC,WAAmB;AACnD,SAAO,OACJ,QAAQ,oBAAoB,IAC5B,QAAQ,8BAA8B,IACtC;AAAA;MAGQ,oBAAoB,CAAC,WAAmB;AACnD,SAAO,OACJ,QAAQ,kDAAkD,IAC1D;AAAA;;;;"}