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

{{year}}
<!-- 2017 -->

{{date}}

Get the current date.

Example

{{date "DD/MM/YYYY"}} 
<!-- 28/04/2015 -->

{{moment}}

Calculate a moment in time.

Example

{{moment format="MM/DD/YYYY"}} 
<!-- 06/17/2021 --->

Calculate a moment using deal variables

Examples

{{moment deal.terms.ContractPeriod.value}}
<!-- 2021-06-17T15:33:41-07:00 --->

{{moment deal.terms.ContractPeriod.value format="MM/DD/YYYY"}}
<!-- 06/17/2021 --->

Date Manipulation

Examples

{{moment add="days" amount="7" format="MM/DD/YYYY"}} 
<!-- 06/24/2021 --->

{{moment subtract="days" amount="7" format="MM/DD/YYYY"}} 
<!-- 06/10/2021 --->

Date Manipulation using deal variables

Examples

{{moment deal.terms.ContractPeriod.value add="days" amount="7" format="MM/DD/YYYY"}} 
<!-- 06/24/2021 --->

{{moment deal.terms.ContractPeriod.value subtract="days" amount="7" format="MM/DD/YYYY"}} 
<!-- 06/10/2021 --->

Date from now and a specific dates

Examples

{{moment "10/06/2021" "fromNow"}}  
<!-- in 4 months --->

{{moment "10/06/2021" "from" "11/06/2021"}}  
<!-- a month ago --->

Date from now and a specific dates using deal variables

{{moment deal.terms.ContractPeriod.value "fromNow"}}  
<!-- in 13 days --->

{{moment deal.terms.ContractPeriod.value "from" "06/01/2021"}}  
<!-- in a month --->

Use moment as a helper. See handlebars.moment for more details.