groovy output date

cal=Calendar.instance
Y=cal.get(Calendar.YEAR)
M = cal.get(Calendar.MONTH) + 1
D = cal.get(Calendar.DATE)
println "$Y-$M-$D"

get beginning of a day

def now = new GregorianCalendar()
def today = new GregorianCalendar(now.get(Calendar.YEAR), now.get(Calendar.MONTH), now.get(Calendar.DAY_OF_MONTH))
date=today.getTime()
println date

http://jqueryui.com/demos/datepicker/#icon-trigger

原文地址:https://www.cnblogs.com/lexus/p/2520884.html