Groovy web console

subscribe to the feed Subscribe
to this
site
Date Example (via #groovywebconsole)
tweet this snippet Tweet
this
script

Date Example

Published 3 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
Date originalDate = new Date()
originalDate.clearTime()
Calendar cal = originalDate.toCalendar()
cal.set(cal.YEAR, cal.MONTH, cal.DAY_OF_MONTH, 9, 0, 0)
Date newDate = cal.getTime()
newDate