Commit Graph

57 Commits

Author SHA1 Message Date
Ben Schofield 8d797fcbcb typo fix 2023-06-05 08:00:07 -07:00
Ben Schofield c177117428 Fixes for comments 2023-06-05 07:58:44 -07:00
Ben Schofield e53aabd914 add datetime parser
Add a relaxed datetime parser. This datetime parser functions by using `chrono`s
own parsing utilities and a try/succeed approach to parsing.

This implementation of the datetime parser has some drawbacks and some
positives. On the positive side:
- it was easy to implement
- it is easy to add more datetime formats to

In order to add additionally supported formats, a developer can add the
required format string to the `format` mod in `parse_datetime.rs`, and
then add it as a potential format to the relevant `fmts` vec.

On the negative:
- It is not easily customiseable beyond the supported `chrono` parsing
  formats. E.g., `chrono` does not currently support parsing offsets
  without trailing zeros. `from_str("UTC+1")` should return a valid response
  but `chrono` fails to parse this.
- Because it is an attempt driven parser, it is likely not that
  performant. I have not done any performance testing as part of this
change, but I would expect a custom parser to perform much better.
2023-06-03 09:58:36 -07:00
Sylvestre Ledru e5d7fbcece We moved from time to chrono v0.3.0 2023-06-03 16:39:58 +02:00
Sylvestre Ledru 060998e90e refresh the fuzz lock 2023-06-03 16:38:42 +02:00
Sylvestre Ledru a272f55948 update of the doc 2023-06-03 16:38:21 +02:00
Sylvestre Ledru 9c5da7959c new release 2023-06-03 16:34:51 +02:00
Sylvestre Ledru a60f1d89f5 Merge pull request #11 from sylvestre/chrono
Port the crate to use chrono instead of time
2023-06-03 16:33:51 +02:00
Sylvestre Ledru 1d78cc5a3f Simplify the check 2023-06-03 16:31:37 +02:00
Sylvestre Ledru 6ba55a075b Fix the various warnings 2023-06-03 14:38:30 +02:00
Sylvestre Ledru b439960eb1 Port the crate to use chrono instead of time 2023-06-03 13:14:00 +02:00
Sylvestre Ledru f1a15ab2b3 Merge pull request #8 from uutils/renovate/regex-1.x
Update Rust crate regex to v1.8.3
2023-05-29 16:09:02 +02:00
Sylvestre Ledru 0bd4dd716a Merge pull request #7 from uutils/renovate/rand-0.x
Update Rust crate rand to 0.8.5
2023-05-29 15:58:18 +02:00
renovate[bot] 674909c0f9 Update Rust crate regex to v1.8.3 2023-05-29 13:33:54 +00:00
renovate[bot] 57bcf7f433 Update Rust crate rand to 0.8.5 2023-05-29 13:33:48 +00:00
Sylvestre Ledru 2e80358014 Merge pull request #6 from uutils/renovate/configure
Configure Renovate
2023-05-29 15:31:52 +02:00
renovate[bot] 15fb185d95 Add renovate.json 2023-05-29 00:16:49 +00:00
Sylvestre Ledru e64c163f47 adjust the license for Debian 2023-05-27 09:43:52 +02:00
Sylvestre Ledru 86378bc326 version 0.2.1 2023-05-12 13:58:33 +02:00
Sylvestre Ledru 6a52551dea Merge pull request #5 from cakebaker/simplify_test
Simplify tests
2023-05-12 13:54:39 +02:00
Sylvestre Ledru 21e7e01fc8 Merge pull request #4 from sylvestre/reverse
Reverse the two functions
2023-05-12 13:54:31 +02:00
Daniel Hofstetter 1359dc9349 Simplify tests 2023-05-12 09:59:31 +02:00
Sylvestre Ledru daec32d5c4 describe the error 2023-05-11 22:15:29 +02:00
Sylvestre Ledru 7a3d0bafca Reverse the two functions 2023-05-11 22:15:07 +02:00
Sylvestre Ledru 537df73bdd Fix a doc warning 2023-05-11 21:57:28 +02:00