date

Signature
x | date(format=?, style=?, locale=?)

Formats a date with strftime format or style (short, medium, long, full). A style is localized in locale (default: the render’s lang; Thai uses the Gregorian calendar); a format’s month and weekday names are English (Go’s .Format) unless locale is given (time.Format, dateFormat: locale=lang). Accepts a date value, a date string or Unix seconds; none prints nothing.

Arguments#

ArgumentTypeRequired
formatstringno
stylestringno
localestringno

Details#

  • Kind: Filter, implemented by fugo.
  • Available in: every kind of template: layouts, partials, shortcodes and render hooks.
  • Output: escaped like any value, unless marked safe.

    Type to search titles, headings and text.