I started using this new Web Framework Play few weeks back and came across the requirement to decide if to use java.util.Date or Joda-time API. I started with java.util.date as it was a simple tryout of writing a small CRUD application in Play, but eventually moved on to Joda-time when more functionality was needed out of the date fields ( I should have thought that from starting ).
But the moving from java.util.Date to Joda-time had some side effects, and I thought there should be some easy solutions to those. One of the problem was, Play has these cool Java extensions format(pattern) and format(pattern,language) which you can use with the Date object in the view templates directly.
${new Date(1275910970000).format('dd MMMM yyyy hh:mm:ss')} 07 June 2010 01:42:50
And when you use Joda-time you don’t have these extension, but the good part about Play is that it is equally easy to create new extensions. Just create a new class which extends play.templates.JavaExtensions and define a method and you are good to go.
So lets start with first using Joda-time API in your models and then creating some Java extensions for Joda-time