MCPcopy Create free account
hub / github.com/Rello/analytics / parseDate

Function parseDate

js/visualization.js:2884–2894  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2882 }
2883
2884 const parseDate = val => {
2885 if (isTimestamp) {
2886 const num = parseInt(val, 10);
2887 if (tsLength > 10) return new Date(num);
2888 return new Date(num * 1000);
2889 }
2890 if (parser) {
2891 return myMoment(val, parser).toDate();
2892 }
2893 return new Date(val);
2894 };
2895
2896 const formatDate = (date, orig) => {
2897 if (isTimestamp) {

Callers 1

visualization.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected