Here you can find the source of getStartTimeByManDay(Date serviceStartTime)
public static Date getStartTimeByManDay(Date serviceStartTime)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getStartTimeByManDay(Date serviceStartTime) { if (serviceStartTime == null) { return null; }// w ww. jav a2 s. c om Calendar startTime = Calendar.getInstance(); startTime.setTime(serviceStartTime); startTime.set(Calendar.MINUTE, 0); startTime.set(Calendar.SECOND, 0); startTime.set(Calendar.MILLISECOND, 0); int startHour = startTime.get(Calendar.HOUR_OF_DAY); if (startHour >= 12) { startTime.set(Calendar.HOUR_OF_DAY, 12); } else { startTime.set(Calendar.HOUR_OF_DAY, 0); } return startTime.getTime(); } }