Skip to content

Releases: baoyachi/duration-str

remove decimal default feature

29 Jul 19:19
Compare
Choose a tag to compare
0.3.2

remove decimal default feature

fix doc

29 Jul 19:07
Compare
Choose a tag to compare
0.3.1

upgrade to 0.3.0

support more than duration unit

29 Jul 19:03
Compare
Choose a tag to compare

Duration Unit List

Parse string to Duration . The String duration unit support for one of:["y","mon","w","d","h","m","s", "ms", "µs", "ns"]

  • 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
  • s:Second.Support string value: ["s" | "S" | "Second" | "SECOND" | "second"]. e.g. 1s
  • ms:Millisecond.Support string value: ["ms" | "MS" | "Millisecond" | "MilliSecond" | "MILLISECOND" | "millisecond", "mSEC"]. e.g. 1ms
  • µs:Microsecond.Support string value: ["µs" | "µS" | "µsecond" | "Microsecond" | "MicroSecond" | "MICROSECOND" | "microsecond", "µSEC"]. e.g. 1µs
  • ns:Nanosecond.Support string value: ["ns" | "NS" | "Nanosecond" | "NanoSecond" | "NANOSECOND" | "nanosecond", "nSEC"]. e.g. 1ns

support Duration deserialize_duration

16 Mar 04:32
Compare
Choose a tag to compare

add chrono features

15 Mar 07:43
Compare
Choose a tag to compare
0.1.4

add chrono duration

refactor code .

11 Mar 17:40
Compare
Choose a tag to compare
  • add document
  • add example
  • refactor code