From 67681815a881f7fdbdeb65fc07d1a333674bcd08 Mon Sep 17 00:00:00 2001 From: Fabian Hiller Date: Tue, 1 Aug 2023 11:59:04 +0200 Subject: [PATCH] Fix bug in coerce date example in methods guide --- website/src/routes/guides/(main-concepts)/methods/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/routes/guides/(main-concepts)/methods/index.mdx b/website/src/routes/guides/(main-concepts)/methods/index.mdx index 5bd972fb5..ef0154555 100644 --- a/website/src/routes/guides/(main-concepts)/methods/index.mdx +++ b/website/src/routes/guides/(main-concepts)/methods/index.mdx @@ -30,7 +30,7 @@ const stringOutput = parse(StringSchema, 1234); // '1234' const NumberSchema = coerce(number(), Number); const numberOutput = parse(NumberSchema, '1234'); // 1234 -const DateSchema = coerce(date(), Date); +const DateSchema = coerce(date(), (i) => new Date(i)); const dateOutput = parse(NumberSchema, '2023-07-31'); // Date ```