How do you display a Date object to your desired pattern in a Playframework 2.X template ?
public class Job {
public Date date
}
When i display @job.date in the scala template, i have the following displayed:
Tue Nov 19 12:49:46 WST 2013
Expected is:
19 Nov
Important : date object is set using new Date(). I don't want to change the pattern when setting the date object, i only want to display my date with the pattern of my choice in the view. Is it possible ?
Many thanks
In scala template:
@job.date.format("dd MMM")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With