Here you can find the source of getTodayHHmmss(String HHmmss)
public static Date getTodayHHmmss(String HHmmss)
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Date; public class Main { public static Date getTodayHHmmss(String HHmmss) { String[] array = HHmmss.split(":"); Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, Integer.valueOf(array[0])); calendar.set(Calendar.MINUTE, Integer.valueOf(array[1])); calendar.set(Calendar.SECOND, Integer.valueOf(array[2])); return calendar.getTime(); }/*www. j a v a2 s . com*/ public static Date getTodayHHmmss(Date date) { Calendar calendar = Calendar.getInstance(); calendar.setTime(date); String str = ""; str = str + calendar.get(Calendar.HOUR_OF_DAY) + ":"; str = str + calendar.get(Calendar.MINUTE) + ":"; str = str + calendar.get(Calendar.SECOND); return getTodayHHmmss(str); } }