Example Date Format Helpers
For this example we are using dates from two different data sources, viewing and tenancy data sources.
Example: Date format with Time
Helper - dateFmt
Formats the field to a Date Format
Helper - timeFmt
Formats the field to a Time Format
Parameter - Day / Month / Year / Hour / Minute
Apply a parameter to the date format to display according to your requirement/
- can be written in a number of ways
{{dateFmt viewing.date "%d/%m/%Y %H:%M"}}
{{dateFmt viewing.date}} {{timeFmt viewing.date}}
Example: Tenancy date format long
Date format long
{{dateFmt tenancy.startDate "%d %B %Y"}}
Example: Date Today format long
Now - Date format long
{{dateFmt 0 "%d %B %Y"}}
Example: Date UK format
Helper - dateFmtUK
Formats the date based on UK DD/MM/YYYY
{{dateFmtUK tenancy.startDate}}
Example: Date Word Format
Helper - dateFmt
Formats the date
Parameter - %v %R
{{dateFmt tenancy.startDate "%v %R"}}