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.

InputArgumentsReturnstime.Timetime.Timeboolfloat64float64bool
Source
BasicSource

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

true
BasicSource

Reports whether a number is below a threshold.

Given

{"stock": 2}

Template

{{ stock | lt:5 }}

Result

true