Skip to main content

Function: date()

date(this, left, format): string

Format a date according to the given format string. If the input is not a date it will be converted to a string and parsed using one of the common date representation standards.

Parameters

this: FilterContext

An object containing a reference to the active render context and any keyword/named arguments.

left: unknown

The date to be formatted.

format: unknown

A format string.

Returns

string

A string representation of the input date according to the given format string.

Defined in

src/builtin/filters/misc.ts:126