How can i format numbers, currency or date values within a dust.js template?
Data:
{
today: 'Wed Apr 03 2013 10:23:34 GMT+0200 (CEST)'
}
Template:
<p>Today: {today} </p>
Like this way: (with moment.js)
<p>Today: {moment(today).format('dd.MM.YYYY')}</p>
Or round some price-values*
Data: { price: 56.23423425 }
Template:
Price: {price.toFixed(2)}