MCPcopy Create free account
hub / github.com/BrasilAPI/BrasilAPI / parseToDate

Function parseToDate

services/date.js:19–21  ·  view source on GitHub ↗
(value, format = '')

Source from the content-addressed store, hash-verified

17 dayjs(date).format(format);
18
19export const parseToDate = (value, format = '') => {
20 return dayjs(value, format).toDate();
21};
22
23export const isValidDate = (date) => dayjs(date).isValid();
24

Callers 1

ActionFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected