Hi,
I could not find anything in the group or google so I decided to ask here.
I am using Play 2.1 with Scala.
How do I display a lot of formatted Joda DateTime dates in a view?
Now I am doing this in my views:
@import org.joda.time.format.DateTimeFormat
@defining(DateTimeFormat.forPattern("yyyy-MM-dd")) { dateFormatter =>
....
<ul>
@for(product <- products) {
<li>@
product.name ( @dateFormatter.print(product.registeredDate) )</li>
}
</ul>
...
}
Is this a correct way to do this? Is there a better way to do the same thing?
Thank you,
Kirill