Here you can find the source of getNoonOfDay(Date day)
public static Date getNoonOfDay(Date day)
//package com.java2s; //License from project: Apache License import java.util.*; public class Main { public static Date getNoonOfDay(Date day) { if (day == null) day = new Date(); Calendar calendar = Calendar.getInstance(); calendar.setTime(day);/*from ww w . j ava 2s.com*/ calendar.set(Calendar.HOUR_OF_DAY, 12); calendar.set(Calendar.MINUTE, calendar.getMinimum(Calendar.MINUTE)); calendar.set(Calendar.SECOND, calendar.getMinimum(Calendar.SECOND)); calendar.set(Calendar.MILLISECOND, calendar.getMinimum(Calendar.MILLISECOND)); return calendar.getTime(); } }