MCPcopy
hub / github.com/NUKnightLab/TimelineJS3 / makeDate

Function makeDate

src/js/date/TLDate.js:371–377  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

369
370// offer something that can figure out the right date class to return
371export function makeDate(data) {
372 var date = new TLDate(data);
373 if (!isNaN(date.getTime())) {
374 return date;
375 }
376 return new BigDate(data);
377}
378
379export function parseDate(str) {
380 if (str.match(ISO8601_SHORT_PATTERN)) {

Callers 1

TLDate.test.jsFile · 0.90

Calls 1

getTimeMethod · 0.45

Tested by

no test coverage detected