blob: c3d582860ca9ad91e5acf061b215c6e2d0ea7319 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
---
title: Before
description: Reports whether TIME1 is before TIME2.
categories: []
keywords: []
action:
related:
- methods/time/After
- methods/time/Equal
- functions/time/AsTime
returnType: bool
signatures: [TIME1.Before TIME2]
---
```go-html-template
{{ $t1 := time.AsTime "2023-01-01T17:00:00-08:00" }}
{{ $t2 := time.AsTime "2030-01-01T17:00:00-08:00" }}
{{ $t1.Before $t2 }} → true
|