Abs
Abs
Returns the absolute value of the given time.Duration value.
绝对值
{{
$d
=
time
.ParseDuration
"-3h"
}}
{{
$d
.Abs
}}
→ 3h0m0s