Date & String Formatting
This section covers filters for formatting date, time, and other string-based values.
formatDate
Formats a date using either the website settings or a custom format.
Usage
{{ "2024-01-01" | formatDate(setting.date_time_format) }}
formatTime
Formats a UNIX timestamp into a readable date.
Usage
{{ "1232435678" | formatTime(setting.date_time_format) }}
timestampToStr
Converts a timestamp into a human-readable format like 1d 2h 30m
.
Usage
{{ "123123123" | timestampToStr }}