loaders ยป date

date() โ†’ Date
dateItems() โ†’ array
dateList() โ†’ array

Accepts YYYY-MM-DD and returns a JavaScript Date object (or throws an error for invalid values).

enostart: 1992-12-01
end: 1994-03-04
invalid: 2018-03-14 13:10
javascriptconst document = eno.parse(input);

document.date('start');  // returns [object Date]
document.date('end');  // returns [object Date]

document.date('invalid');
  // throws an error: 'invalid' must contain a valid date, for instance '1993-11-18'.