From 2be5cb32a6a695a081a3b22212b54159612ce387 Mon Sep 17 00:00:00 2001 From: Benjamin Chrobot Date: Fri, 6 Oct 2023 16:45:51 -0400 Subject: [PATCH] fix: make Z optional for 0 precision case --- src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types.ts b/src/types.ts index a562b760a6..3044ca82e7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -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) {