Add parsing functionality for time periods with tests in Rust
This commit introduces a new feature for parsing strings representing time periods into a Period
enum with
variants for days, weeks, months, and years. The Period
enum also includes a method to convert these periods in
chrono::Duration
objects. The parsing is done using the nom
crate, with support for both numeric and written
numbers. Additionally, unit tests are included to ensure the parsing works correctly for various inputs, includin
edge cases and invalid strings.
-
Notifications
You must be signed in to change notification settings - Fork 0
RandoomWalks/calculator_and_time
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published