Thursday, 31 October 2013

Joda Time - handling of end of February when DateTime.plusMonths() is called

Overheard a colleague at work with an issue re: February and got
curious enough to see what Joda-Time does in handling this scenario:

// if current date is 31st, how will joda-time handle setting month to february?
dt = new DateTime();
println "now: " + dt.toString();
futureDt = dt.plusMonths(4);
println "4 mos in future: " + futureDt.toString();


now: 2013-10-31T15:29:53.628+11:00
4 mos in future: 2014-02-28T15:29:53.628+11:00


The Groovy Shell functionality within IntelliJ IDEA makes quick
playing around like this a breeze!

Friday, 25 October 2013

Phatch - Photo Batch Processor

Found myself having to generate different resolutions of images.
Originally planned to use ImageMagick from a ruby script but came
across something quicker and easier - Phatch on Linux.