Skip to content

Commit

Permalink
Fix bug in coerce date example in methods guide
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian-hiller committed Aug 1, 2023
1 parent 35312f2 commit 6768181
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

Expand Down

0 comments on commit 6768181

Please sign in to comment.