lt
Reports whether the value falls before the given date, so `{{ starts_at | lt:now }}` asks whether a date has passed.
Both sides have to be real dates, on the same terms GtTime states.
InputArgumentsReturns
Sourcetime.Timetime.Timeboolfloat64float64boolBasicSource
Asks whether a date has passed.
Given
{"starts_at": time.Date(2024, 3, 1, 0, 0, 0, 0, time.UTC), "today": time.Date(2024, 3, 14, 0, 0, 0, 0, time.UTC)}Template
{{ starts_at | lt:today }}Result
trueBasicSource
Reports whether a number is below a threshold.
Given
{"stock": 2}Template
{{ stock | lt:5 }}Result
true