Posted By

callmeblessed on 01/02/09


Tagged

date java groovy grails


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mahome


Groovy: Date [1]


 / Published in: Groovy
 

URL: www.wysmedia.com

create a date using Calendar

  1. def calendar = Calendar.instance;
  2. calendar.with {
  3. clear()
  4. set MONTH, JULY
  5. set DATE, 4
  6. set YEAR, 1929
  7. println time
  8. }
  9.  
  10. will print -> Thu Jul 04 00:00:00 ICT 1929
  11. :)

Report this snippet  

You need to login to post a comment.