MCPcopy Create free account
hub / github.com/11ty/parse-date-strings / parseDate

Function parseDate

test/temporal.js:15–20  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

13}
14
15export function parseDate(str) {
16 let d = Temporal.PlainDate.from(str, {
17 overflow: "reject"
18 });
19 return new Date(convertTemporalToTimestamp(d)).toUTCString();
20}
21
22export function parseDateTime(str) {
23 let d;

Callers 1

parseFunction · 0.85

Calls 1

Tested by

no test coverage detected