Is there an easier way to get start of current day time than this?

Posted by Seymour Cakes on Stack Overflow See other posts from Stack Overflow or by Seymour Cakes
Published on 2010-03-15T09:03:50Z Indexed on 2010/03/15 9:09 UTC
Read the original article Hit count: 191

Filed under:
|
|
|

I basically want to get zero or beginning hour for currrent day.

def today = Calendar.instance
today.set(Calendar.HOUR_OF_DAY, 0)
today.set(Calendar.MINUTE, 0)
today.set(Calendar.SECOND, 0)
println today // Mon Mar 15 00:00:00 SGT 2010

© Stack Overflow or respective owner

Related posts about java

Related posts about groovy