feat(clp-s::timestamp_parser): Add support for ignoring quotes in quoted timestamp patterns.#1847
Conversation
WalkthroughThe changes introduce support for quoted timestamp patterns in the timestamp parser. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
LinZhihao-723
left a comment
There was a problem hiding this comment.
The change lgtm!
For the PR title, how about:
feat(clp-s::timestamp_parser): Add support for ignoring quotes in quoted timestamp patterns.
to make it a bit more concise
…ted timestamp patterns. (y-scope#1847)
Description
This PR changes the parsing behaviour of the timestamp parser to skip the beginning and end quote in a quoted timestamp pattern when parsing raw UTF-8 timestamps. This change will allow some of the code in #1788 to be simplified.
This change allows code that uses this library to handle UTF-8 and JSON literals in a simpler way. E.g., the pattern
"\Y"can be used to parse both the JSON literal"2024"and the raw UTF-8 string2024by simply passing the right flags totimestamp_parser::parse_timestamp. The previous approach would have required library users to use a different timestamp pattern (here,\Y) for the UTF-8 case, which is cumbersome.Checklist
breaking change.
Validation performed
Summary by CodeRabbit
Release Notes
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.