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

Function parseDate

js/visualization.js:2869–2879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2867 }
2868
2869 const parseDate = val => {
2870 if (isTimestamp) {
2871 const num = parseInt(val, 10);
2872 if (tsLength > 10) return new Date(num);
2873 return new Date(num * 1000);
2874 }
2875 if (parser) {
2876 return myMoment(val, parser).toDate();
2877 }
2878 return new Date(val);
2879 };
2880
2881 const formatDate = (date, orig) => {
2882 if (isTimestamp) {

Callers 1

visualization.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected