Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Mar 11, 2021
1 parent 6282e41 commit 5e61715
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# parse string to std::time::Duration

[![Chrono GitHub Actions](https://github.com/baoyachi/duration-str-rs/workflows/build/badge.svg)](https://github.com/baoyachi/duration-str-rs/actions?query=workflow%3Abuild)
[![Chrono GitHub Actions](https://github.com/baoyachi/duration-str-rs/actions/workflows/check.yml/badge.svg)](https://github.com/baoyachi/duration-str-rs/actions?query=workflow%3Abuild)
[![Crates.io](https://img.shields.io/crates/v/duration-str.svg)](https://crates.io/crates/duration-str)
[![Docs.rs](https://docs.rs/duration-str/badge.svg)](https://docs.rs/duration-str)


Parse string to `Duration` . The String value unit support for one of:[y,mon,w,d,h,m,s]
- y:Year. Support string value: ["y" | "year" | "Y" | "YEAR" | "Year"]. e.g. 1y
- mon:Month.Support string value: ["mon" | "MON" | "Month" | "month" | "MONTH"]. e.g. 1mon
- w:Week.Support string value: ["w" | "W" | "Week" | "WEEK" | "week"]. e.g. 1w
- d:Day.Support string value: ["d" | "D" | "Day" | "DAY" | "day"]. e.g. 1d
- h:Hour.Support string value: ["h" | "H" | "Hour" | "HOUR" | "hour"]. e.g. 1h
- m:Minute.Support string value: ["m" | "M" | "Minute" | "MINUTE" | "minute"]. e.g. 1m
- m:Second.Support string value: ["s" | "S" | "Second" | "SECOND" | "second"]. e.g. 1s
Parse string to `Duration` . The String value unit support for one of:`[y,mon,w,d,h,m,s]`
- y:Year. Support string value: `["y" | "year" | "Y" | "YEAR" | "Year"]`. e.g. 1y
- mon:Month.Support string value:` ["mon" | "MON" | "Month" | "month" | "MONTH"]. e.g. 1mon
- w:Week.Support string value: `["w" | "W" | "Week" | "WEEK" | "week"]`. e.g. 1w
- d:Day.Support string value: `["d" | "D" | "Day" | "DAY" | "day"]`. e.g. 1d
- h:Hour.Support string value: `["h" | "H" | "Hour" | "HOUR" | "hour"]`. e.g. 1h
- m:Minute.Support string value: `["m" | "M" | "Minute" | "MINUTE" | "minute"]`. e.g. 1m
- m:Second.Support string value: `["s" | "S" | "Second" | "SECOND" | "second"]`. e.g. 1s

Also,`duration_str` support time duration simple calcaute(+,*). See example:
Also,`duration_str` support time duration simple evaluation(+,*). See example:


## example
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//!
//! - m:Second.Support string value: ["s" | "S" | "Second" | "SECOND" | "second"]. e.g. 1s
//!
//! Also,`duration_str` support time duration simple calcaute(+,*). See example:
//! Also,`duration_str` support time duration simple evaluation(+,*). See example:
//!
//! # Example
//!
Expand Down

0 comments on commit 5e61715

Please sign in to comment.