HUGO
News Docs Themes Community GitHub

Abs

Returns the absolute value of the given time.Duration value.

Syntax

DURATION.Abs

Returns

time.Duration
{{ $d = time.ParseDuration "-3h" }}
{{ $d.Abs }} → 3h0m0s

Last updated: January 1, 0001
Improve this page