aboutsummaryrefslogtreecommitdiffhomepage
path: root/content/en/methods/time/Before.md
diff options
context:
space:
mode:
Diffstat (limited to 'content/en/methods/time/Before.md')
-rw-r--r--content/en/methods/time/Before.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/content/en/methods/time/Before.md b/content/en/methods/time/Before.md
new file mode 100644
index 000000000..c3d582860
--- /dev/null
+++ b/content/en/methods/time/Before.md
@@ -0,0 +1,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