Format
Format numbers and strings for display.
Format
currencyConverts a numeric value between currency units by scaling it with a
ratio of unit sizes: the result is value * toUnits / fromUnits, truncated to a
whole integer.{{ price | currency:1,100 }}dateRenders a date/time value using a PHP-style date layout (Y is the
4-digit year, m the zero-padded month, d the day, H:i:s the time, and so on).{{ at | date:'Y-m-d' }}decimalFormats a number with the given number of decimal places,
rounding to the nearest value at that precision.{{ ratio | decimal:4 }}from_dateReads a date out of a string using the same PHP-style layout the
date modifier writes with, so June 26, 2026 piped through
from_date:'F j, Y' becomes a real time.Time that a date column can take.{{ printed | from_date:'F j, Y' | date:'Y-m-d' }}lengthReturns the number of UTF-8 bytes in a string, so a multi-byte
character such as "é" counts as more than one.{{ name | length }}line_numbersPrepends each line of the input with a line number counting up
from a given start line, so line_numbers:6 renders a block as if it began at
line six.{{ body | line_numbers:6 }}