Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DateScrubber.getScrubberFor doesn't support the following #112

Open
LarsEckart opened this issue Sep 23, 2020 · 10 comments
Open

DateScrubber.getScrubberFor doesn't support the following #112

LarsEckart opened this issue Sep 23, 2020 · 10 comments

Comments

@LarsEckart
Copy link
Contributor

LarsEckart commented Sep 23, 2020

if your particular date is not supported, please add it here.

Legend

👀 = we've seen it, we deal with it next time we come together
🚀 = Date format has been added

@AWinterman
Copy link

default date format Wed Sep 22 22:49:42 PDT 2021

@LarsEckart
Copy link
Contributor Author

default date format Wed Sep 22 22:49:42 PDT 2021

https://github.com/approvals/ApprovalTests.Java/releases/tag/12.3.1 :)

@LarsEckart
Copy link
Contributor Author

that's interesting, in the past (jdk 17?) a call to new Date() returned Wed Nov 17 22:28:33 EET 2021, now the test fails because currently this call returns Tue Apr 05 18:32:30 EEST 2022. EET -> EEST

@ssiegler
Copy link

ssiegler commented Sep 29, 2022

Format of the HTTP Date Header Wed, 21 Oct 2015 07:28:00 GMT matches (Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \d{4} \d{2}:\d{2}:\d{2} GMT

@LarsEckart
Copy link
Contributor Author

@ssiegler added in 3f2c230 it'll go live with the next release (probably next Monday).

@prerakatolia
Copy link

prerakatolia commented May 18, 2023

2023-05-18T09:25:10.127 / 2023-05-18T09:25:11.71
\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{2}:\d{2}.\d{1,3}

@mkutz
Copy link

mkutz commented Dec 17, 2024

2024-12-17
\d{4}-\d{2}-\d{2}

@helgewessels
Copy link

2024-12-18T14:04:46.746130Z
\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{2}:\d{2}.\d{1,6}Z

@LarsEckart
Copy link
Contributor Author

24.13.0, which supports those 2 formats, is being released right now, should be available from maven central soon.

Thank you for reporting these regexes and examples.

@helgewessels
Copy link

I came across other variants of Instant serialization with regard to precision. Furthermore, the . should be escaped.
This should cover everything from no fraction of second up to nanosecond precision:
\d{4}-\d{1,2}-\d{1,2}T\d{1,2}:\d{2}:\d{2}(\.\d{1,9})?Z
2024-12-18T14:04:46Z, 2024-12-18T14:04:46.746130834Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants