Date Operators
When we need to work with dates, these operators will help with your markdown.
List of Operators
{{ year }}
Get the current year.
Example
{{ date }}
The date operator is used to format a date. It takes two required arguments and an optional third argument for the timezone. The syntax for using this operator:
The datetime argument represents the date and time value that you want to format. It can be a JavaScript Date object, a string that can be parsed into a Date object, or a number representing the number of milliseconds since the Unix epoch.
The format argument specifies the desired format for the date output. It follows the formatting tokens defined by Moment.js. For example, "DD-MM-YYYY" represents the day, month, and year in the format "21-01-2021".
The timezone argument is optional and allows you to specify the timezone for the date. It uses the tz database (also known as the Olson database) to determine the timezone. If not provided, the date will be formatted in the local timezone of the user's environment.
Examples
{{ moment }}
Calculate a moment in time.
Example
Calculate a moment using deal variables
Examples
Date Manipulation
Examples
Date Manipulation using deal variables
Examples
Date from now and a specific dates
Examples
Date from now and a specific dates using deal variables
Use moment as a helper. See handlebars.moment for more details.