Groovy Timestamp

on Wednesday 25 September 2013
There's small changes you make when developing that you often disregard as too simple to matter. One such example is shown below.

Dates should be ordered: YEAR, MONTH, DAY. (e.g. YYYYMMDD, YYMMDD, YYYYMM). Time should be ordered: HOUR, MINUTES, SECONDS (HHMMSS). The reason for this is that files will always be sorted in correct chronological order.

As a build manager I use this most in my Gradle scripts for ordering the build output logs.

0 comments:

Post a Comment