Skip to main

Date & Time Filters

src/filters/time.js

In addition to the date/time filters, we have a getDate shortcode that outputs the current date in a given format.

Example:

Copyright © {% getDate 'year' %}

Formatting

getDate()

Returns a date in any format.

Params:

  • date {date | string}

    If no date is given, returns the current date

  • format {string}

    See js file for a list of available date formats

Example:

{{ pubdate | getDate('iso') }}

See Also