Returns a `time.Duration` structure, using the given time unit and duration number.
functions
docs
parent
functions
aliases
returnType
signatures
duration
time.Duration
time.Duration TIME_UNIT DURATION_NUMBER
time.AsTime
time.Duration
time.Format
time.Now
time.ParseDuration
/functions/duration
time.Duration converts a given number into a time.Duration structure so you can access its fields. E.g. you can perform time operations on the returned time.Duration value:
{{printf"There are %.0f seconds in one day."(duration"hour"24).Seconds}}<!-- Output: There are 86400 seconds in one day. -->
Make your code simpler to understand by using a chained pipeline: