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

Function parseDate

js/visualization.js:2213–2223  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2211 }
2212
2213 const parseDate = val => {
2214 if (isTimestamp) {
2215 const num = parseInt(val, 10);
2216 if (tsLength > 10) return new Date(num);
2217 return new Date(num * 1000);
2218 }
2219 if (parser) {
2220 return myMoment(val, parser).toDate();
2221 }
2222 return new Date(val);
2223 };
2224
2225 const formatDate = (date, orig) => {
2226 if (isTimestamp) {

Callers 1

visualization.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected