Groovy web console

subscribe to the feed Subscribe
to this
site
90% time of winter (via #groovywebconsole)
tweet this snippet Tweet
this
script

90% time of winter

Published 3 months ago by ruslan
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def days = 31+31+28
def secs = days * 24 * 60 * 60
long secs90 = secs * 0.90 // 90% of seconds

def firstDate = new Date().parse('yyyy.MM.dd', '2016.12.01')
def targetDate = new Date(firstDate.getTime() + secs90 * 1000)

println targetDate