• Stars
    star
    1
  • Language
    Go
  • License
    MIT License
  • Created over 1 year ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Go Durations easly parse string durations with no order and high durations like 1 year.

1. Go Durations

Go Report Card PkgGoDev

1.1. What is this for

Go Durations easily parse string durations without any order in input order and high durations like 1 year.

1.2. Why

I was looking for parser with out any order on string, easy to use, support long term durations such as year, month. I couldn't find so I created one.

1.3. Usage

Duration, Err := GetDuration("1mon 1w 1h 1m 1s")

Duration, Err := GetDuration("1h 1w 1m 1y")

1.4. All Durations

Durations short Package
Nanosecond ns Time.Time
Microsecond us & µs & μs Time.Time
Millisecond ms Time.Time
Second s Time.Time
Minute m Time.Time
Hour h Time.Time
Day d durations
Week w durations
Month mon durations
Year y durations
Century c durations

1.5. Credit

ElecTwix