diff --git a/approvaltests/scrubbers/date_scrubber.py b/approvaltests/scrubbers/date_scrubber.py index c501259..3beb5b1 100644 --- a/approvaltests/scrubbers/date_scrubber.py +++ b/approvaltests/scrubbers/date_scrubber.py @@ -61,6 +61,10 @@ def get_supported_formats(): r"(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s([0-3]?\d)\s([0-1]\d:[0-5]\d:[0-5]\d)\s(\d{4})", ["Tue May 13 16:30:00 2014", "Wed Dec 11 14:59:44 2024"], ), + ( + r"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2}", + ["2021-09-10T08:07:00+03:00", "2021-01-01T00:00:00+00:00"], + ), ] def __init__(self, date_regex: str): diff --git a/tests/scrubbers/test_date_scrubber.test_supported_formats_as_table.approved.md b/tests/scrubbers/test_date_scrubber.test_supported_formats_as_table.approved.md index 15699f7..5d86c34 100644 --- a/tests/scrubbers/test_date_scrubber.test_supported_formats_as_table.approved.md +++ b/tests/scrubbers/test_date_scrubber.test_supported_formats_as_table.approved.md @@ -14,3 +14,4 @@ | 2023-07-16 17:39:03.293919 | \d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{2}\:\d{2}\.\d{6} | | 20210505T091112Z | \d{8}T\d{6}Z | | Tue May 13 16:30:00 2014 | (Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s([0-3]?\d)\s([0-1]\d:[0-5]\d:[0-5]\d)\s(\d{4}) | +| 2021-09-10T08:07:00+03:00 | \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2} | diff --git a/tests/scrubbers/test_date_scrubber.test_unsupported_format.approved.txt b/tests/scrubbers/test_date_scrubber.test_unsupported_format.approved.txt index 2430197..b6ed7b2 100644 --- a/tests/scrubbers/test_date_scrubber.test_unsupported_format.approved.txt +++ b/tests/scrubbers/test_date_scrubber.test_unsupported_format.approved.txt @@ -15,3 +15,4 @@ Exception: No match found for 'an unsupported format'. 2023-07-16 17:39:03.293919 | \d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{2}\:\d{2}\.\d{6} 20210505T091112Z | \d{8}T\d{6}Z Tue May 13 16:30:00 2014 | (Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s([0-3]?\d)\s([0-1]\d:[0-5]\d:[0-5]\d)\s(\d{4}) + 2021-09-10T08:07:00+03:00 | \d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2}