Groovy web console

subscribe to the feed Subscribe
to this
site

Date Add

Published 1 month ago by Tusar with tags Date Add Calendar
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
def date = new java.util.Date("08/08/2019")

println("date ---> " + date)

def cal = Calendar.getInstance()
cal.setTime(date)
cal.add(Calendar.DATE, 100)


//date.plus(100)

println("date with 100 ---> " + cal.getTime())