Date Filters

Date Filters

Use date filters to convert, manipulate, and display dates.

add_days

Return a date object operand days in the future. If operand is negative, return a date that many days in the past.

add_hours

Return a date object operand hours in the future. If operand is negative, return a date that many hours in the past.

add_minutes

Return a date object operand minutes in the future. If operand is negative, return a date that many minutes in the past.

add_months

Return a date object operand months in the future. If operand is negative, return a date that many months in the past.

add_weeks

Return a date object operand weeks in the future. If operand is negative, return a date that many weeks in the past.

add_years

Return a date object operand years in the future. If operand is negative, return a date that many years in the past.

date

Returns the current value as a date. If format is specified, converts the date to a string before returning it using the given format. format must be a valid .NET date format.

midnight

Return the date representing midnight for the current value

time_diff

If format is unspecified, returns a time_diff object describing the difference between the current date and the other date. If format is specified, converts the time difference to a string before returning it using the given format. format must be a valid .NET TimeSpan format.

timezone

Returns the timezone that the date is in. If full is true, returns the full timezone identifier (eg: "Europe/Rome"). If full is false (default) or not specified, returns the abbreviated timezone name (eg: "CET").

to_timezone

Converts the current date to the specified timezone (eg: "America/Indianapolis")