[Anthill-pro] Stamping with formated date

emerson cargnin echofloripa.yell at gmail.com
Tue Apr 8 14:08:29 CDT 2008


Hi

if someone wants to create a nightly build, here is a beanshell
expression that gives
and string in the format "NIGHTLY-build-04/09/2008-19:38" :

NIGHTLY-build-${bsh:java.util.GregorianCalendar calendar = new
java.util.GregorianCalendar();
calendar.add(java.util.Calendar.DATE,1); Date date =
calendar.getTime(); new
java.text.SimpleDateFormat("MM/dd/yyyy-HH:mm").format(date)}

Just put everything in the same line...

More info on how create a nightly build here:
http://echofloripa.blogspot.com/

regards
Emerson


More information about the Anthill-pro mailing list