From dbe173576af7615d5162208204486facb343c1ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Moskal?= Date: Mon, 30 Dec 2024 19:18:52 +0100 Subject: [PATCH] restrict month day numbers in date formats (#96) --- parser/src/json/formats.rs | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/parser/src/json/formats.rs b/parser/src/json/formats.rs index 7ee7ee2..b0c3d83 100644 --- a/parser/src/json/formats.rs +++ b/parser/src/json/formats.rs @@ -1,12 +1,31 @@ pub fn lookup_format(name: &str) -> Option<&str> { let r = match name { - "date-time" => { - r"^(?P[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01]))[tT](?P