Skip to content

Commit

Permalink
fix: make Z optional for 0 precision case
Browse files Browse the repository at this point in the history
  • Loading branch information
bchrobot committed Oct 6, 2023
1 parent 5078c8f commit 2be5cb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ const datetimeRegex = (args: { precision: number | null; offset: boolean }) => {
`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$`
);
} else {
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$`);
return new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z?$`);
}
} else {
if (args.offset) {
Expand Down

0 comments on commit 2be5cb3

Please sign in to comment.