Usually, when you want to get the value of a placeholder, you just surround it with ${ and }. But there are placeholders whose values require some kind of formatting. For instance, placeholders for dates require to indicate how the date should be formatted.
To format the invoice date you must use the following code ${invoice.date?date}. The ?date part tells that the date should be formatted using a default date format. Dates cannot be displayed unless you specify a format (even default).
<p><strong>Date:</strong> ${invoice.date?date}</p>
<p><strong>Number:</strong> ${invoice.number}</p>Another way to format the invoice date would be ${invoice.date?string("yyyy-MM-dd")}, where yyyy is the year, MM is the month and dd is the day. Of course, you can change their order however you like.
|
Copyright © 2006-2009 Fanurio Time Tracking SRL |