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

Function parseDate

js/visualization.js:1954–1964  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1952 }
1953
1954 const parseDate = val => {
1955 if (isTimestamp) {
1956 const num = parseInt(val, 10);
1957 if (tsLength > 10) return new Date(num);
1958 return new Date(num * 1000);
1959 }
1960 if (parser) {
1961 return myMoment(val, parser).toDate();
1962 }
1963 return new Date(val);
1964 };
1965
1966 const formatDate = (date, orig) => {
1967 if (isTimestamp) {

Callers 1

visualization.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected