5.0 - Comparing dates in painless

This seems like it could really help, but I don't think DateTimeFormat is allowed http://stackoverflow.com/questions/3307330/using-joda-date-time-api-to-parse-multiple-formats

Without this script I'm completely blocked and it looks less and less likely I'll be able to move to painless :frowning: