feat: Pluggable datetime parsing
- Dominant language
- Rust
- Stars
- 9.3k
- Forks
- 2.4k
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 344
Description
### Is your feature request related to a problem or challenge?
Add support for pluggable datetime parsing - Chrono by default, jiff as an option if feature enabled, with the possibility of others in the future (Java format comes to mine for comet).
Jiff is [faster overall for parsing](https://github.com/BurntSushi/jiff/blob/master/COMPARE.md#jiff-is-generally-faster-than-chrono) though it's not quite as lenient as chrono though with some of the [strptime options](https://docs.rs/jiff/latest/jiff/fmt/strtime/index.html#conversion-specifications).
In testing Jiff is about twice as fast as Chrono as long the format matches the string - Jiff errors are more expensive than Chrono errors.
This would impact to_timestamp, to_date and to_time.
### Describe the solution you'd like
Extract out a DateTimeParser trait with Chrono and Jiff implementations with jiff behind a feature flag.
### Describe alternatives you've considered
Leave things unchanged.
### Additional context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.