Expand description
- Parse human-readable strings like
15 years 5 weeks 2 hours
or28m15s10ns
intozuck::Duration
. - Normalize the input via
zuck::Duration.normalize()
method. - Convert
zuck::Duration
back into human-readable string. - You can also convert from and into
std::time::Duration
.
§Aliases that can be used as input for parsing
- Nanoseconds:
ns
,nsec
,nsecs
,nanosec
,nanosecs
,nanosecond
,nanoseconds
- Microseconds:
μs
,us
,usec
,usecs
,microsec
,microsecs
,microsecond
,microseconds
- Milliseconds:
ms
,msec
,msecs
,millisecond
,milliseconds
- Seconds:
s
,sec
,secs
,second
,seconds
- Minutes:
m
,min
,mins
,minute
,minutes
- Hours:
h
,hr
,hrs
,hour
,hours
- Days:
d
,day
,days
- Weeks:
w
,wk
,wks
,week
,weeks
- Months:
mo
,month
,months
- Years:
y
,yr
,yrs
,year
,years
Modules§
Structs§
Enums§
Statics§
- Max allowed string length of the raw time unit or int value.