This commit is contained in:
parent
7f7561ad3e
commit
9351b39a4b
@ -12,7 +12,12 @@
|
||||
let internal;
|
||||
|
||||
const input = (x) => (internal = dayjs(x).format(format));
|
||||
const output = (x) => (date = dayjs(x, format).toDate().toISOString());
|
||||
const output = (x) => {
|
||||
const d = dayjs(x, format).toDate();
|
||||
if (d) {
|
||||
date = d.toISOString();
|
||||
}
|
||||
};
|
||||
|
||||
$: input(date)
|
||||
$: output(internal)
|
||||
|
Reference in New Issue
Block a user