I have an object in Freemarker which has dates in ISO8601 format (e.g. 2012-02-01T13:01:02+0000
), how would I go about working out the difference in days between it and now?
In other non-Java scenarios I'd reformat it as a unix timestamp and do the maths (like the distance_of_time_in_words
functions in RoR or Symfony), however as far as I can see, Freemarker is unable to turn a ISO8601 timestamp into unix timestamp.
And yes, I realise the template layer probably isn't the right place to be doing this kind of thing, but needs must etc.