Groovy: Date [1]


/ Published in: Groovy
Save to your folder(s)

create a date using Calendar


Copy this code and paste it in your HTML
  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. :)

URL: www.wysmedia.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.