Misc. experiments in groovy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
223 B

9 years ago
  1. import groovy.time.TimeCategory
  2. use(TimeCategory) {
  3. def now = new Date()
  4. def then = now + 14.weeks + 6.days
  5. def fmt = 'EEE MMM dd yyyy'
  6. println now.clearTime()
  7. println now.format(fmt)
  8. println then.format(fmt)
  9. }