78 Commits

Author SHA1 Message Date
Sylvestre Ledru bed2d16e67 Release version 0.4.0 v0.4.0 2023-06-09 13:43:54 +02:00
Sylvestre Ledru 7ab1ad2f0e document the old name 2023-06-09 13:43:04 +02:00
Sylvestre Ledru c1a2bef4a6 Merge pull request #22 from sylvestre/rename
rename from humantime_to_duration to parse_datetime
2023-06-09 13:41:17 +02:00
Sylvestre Ledru 673d5b600e rename from humantime_to_duration to parse_datetime 2023-06-09 10:16:26 +02:00
Sylvestre Ledru 83e1431db0 Merge pull request #21 from sylvestre/fuzz
Also fuzz fuzz_parse_datetime_from_str for a minute
2023-06-08 11:27:07 +02:00
Sylvestre Ledru 80f8fdf883 README: syntax highlighting 2023-06-07 15:01:25 +02:00
Sylvestre Ledru 22bdd8f49c run the fuzzers in the CI 2023-06-07 13:52:00 +02:00
Sylvestre Ledru dc508c469b add a fuzzer for parse_datetime_from_str 2023-06-07 13:51:40 +02:00
Sylvestre Ledru e503de7559 Merge pull request #12 from Benjscho/main
add datetime parser
2023-06-07 10:03:17 +02:00
Ben Schofield 7ee33d1fb1 cargo fmt 2023-06-06 10:26:05 -07:00
Ben Schofield bc33770075 Update README
Update the README and add a test module to parse_datetime for any
examples presented in the README.
2023-06-06 10:05:14 -07:00
Sylvestre Ledru 70d3e53604 new release v0.3.1 2023-06-06 11:46:45 +02:00
Sylvestre Ledru 1ba787d1c3 Merge pull request #17 from cakebaker/downgrade_libc
Downgrade libc from 0.2.145 to 0.2.144
2023-06-06 08:02:47 +02:00
Daniel Hofstetter 33cefd7db2 Downgrade libc from 0.2.145 to 0.2.144 2023-06-06 07:49:14 +02:00
Sylvestre Ledru d0d913e161 Merge pull request #16 from uutils/renovate/regex-1.x
Update Rust crate regex to 1.8.4
2023-06-05 19:40:31 +02:00
renovate[bot] c784a721ee Update Rust crate regex to 1.8.4 2023-06-05 16:52:25 +00:00
Ben Schofield 29e7a5c335 Update src/parse_datetime.rs
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-06-05 08:04:22 -07:00
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
Sylvestre Ledru 03c8e81a10 Merge pull request #15 from Redfire75369/patch-1
Added Syntax Highlighting to Example in ReadME
2023-06-05 14:32:06 +02:00
Redfire 7547f31b76 Added Syntax Highlighting to Example in ReadME 2023-06-05 20:22:57 +08:00
Sylvestre Ledru 1c32733f38 Merge pull request #14 from cakebaker/remove_time_crate
Adapt chrono settings to remove old time crate
2023-06-05 09:53:01 +02:00
Daniel Hofstetter 5278394b7c Adapt chrono settings to remove old time crate 2023-06-05 09:18:54 +02: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