1 line
1.7 KiB
JSON
1 line
1.7 KiB
JSON
{"ast":null,"code":"const formatDate = date => {\n let tempDate = new Date(parseInt(date));\n const year = tempDate.getFullYear();\n const month = tempDate.getMonth() + 1;\n const day = tempDate.getDate();\n return `${[year, month, day].map(formatNumber).join('-')}`;\n};\nconst formatNumber = n => {\n n = n.toString();\n return n[1] ? n : `0${n}`;\n};\nmodule.exports = {\n formatNumber,\n formatDate\n};","map":{"version":3,"names":["formatDate","date","tempDate","Date","parseInt","year","getFullYear","month","getMonth","day","getDate","map","formatNumber","join","n","toString","module","exports"],"sources":["E:/work/sino/sino-h5/src/utils/common.js"],"sourcesContent":["const formatDate = date => {\r\n let tempDate = new Date(parseInt(date))\r\n const year = tempDate.getFullYear()\r\n const month = tempDate.getMonth() + 1\r\n const day = tempDate.getDate()\r\n return `${[year, month, day].map(formatNumber).join('-')}`\r\n}\r\n\r\nconst formatNumber = n => {\r\n n = n.toString()\r\n return n[1] ? n : `0${n}`\r\n}\r\n\r\nmodule.exports = {\r\n formatNumber,\r\n formatDate\r\n}\r\n"],"mappings":"AAAA,MAAMA,UAAU,GAAGC,IAAI,IAAI;EACzB,IAAIC,QAAQ,GAAG,IAAIC,IAAI,CAACC,QAAQ,CAACH,IAAI,CAAC,CAAC;EACvC,MAAMI,IAAI,GAAGH,QAAQ,CAACI,WAAW,CAAC,CAAC;EACnC,MAAMC,KAAK,GAAGL,QAAQ,CAACM,QAAQ,CAAC,CAAC,GAAG,CAAC;EACrC,MAAMC,GAAG,GAAGP,QAAQ,CAACQ,OAAO,CAAC,CAAC;EAC9B,OAAQ,GAAE,CAACL,IAAI,EAAEE,KAAK,EAAEE,GAAG,CAAC,CAACE,GAAG,CAACC,YAAY,CAAC,CAACC,IAAI,CAAC,GAAG,CAAE,EAAC;AAC5D,CAAC;AAED,MAAMD,YAAY,GAAGE,CAAC,IAAI;EACxBA,CAAC,GAAGA,CAAC,CAACC,QAAQ,CAAC,CAAC;EAChB,OAAOD,CAAC,CAAC,CAAC,CAAC,GAAGA,CAAC,GAAI,IAAGA,CAAE,EAAC;AAC3B,CAAC;AAEDE,MAAM,CAACC,OAAO,GAAG;EACfL,YAAY;EACZZ;AACF,CAAC"},"metadata":{},"sourceType":"script","externalDependencies":[]} |