Debian Codegraph @

docs/content/en/methods/time/Sub.md

raw
1 ---
2 title: Sub
3 description: Returns the duration computed by subtracting TIME2 from TIME1.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: time.Duration
9 signatures: [TIME1.Sub TIME2]
10 ---
11
12 ```go-html-template
13 {{ $t1 := time.AsTime "2023-01-27T23:44:58-08:00" }}
14 {{ $t2 := time.AsTime "2023-01-26T22:34:38-08:00" }}
15
16 {{ $t1.Sub $t2 }} → 25h10m20s
17 ```