Here you can find the source of setCalendar(int hour, int mins)
Parameter | Description |
---|---|
hour | a parameter |
mins | a parameter |
public static Calendar setCalendar(int hour, int mins)
//package com.java2s; //License from project: Open Source License import java.util.Calendar; public class Main { /**/* w w w . jav a 2 s. com*/ * @param hour * @param mins */ public static Calendar setCalendar(int hour, int mins) { return setCalendar(hour, mins, 0); } /** * @param hour * @param mins * @param seco */ public static Calendar setCalendar(int hour, int mins, int seco) { Calendar c = Calendar.getInstance(); c.set(Calendar.HOUR_OF_DAY, hour); c.set(Calendar.MINUTE, mins); c.set(Calendar.SECOND, seco); return c; } /** * @param day * @param hour * @param mins * @param seco */ public static Calendar setCalendar(int day, int hour, int mins, int seco) { Calendar c = setCalendar(hour, mins, seco); c.set(Calendar.DAY_OF_MONTH, day); return c; } /** * @param mont * @param day * @param hour * @param mins * @param seco */ public static Calendar setCalendar(int mont, int day, int hour, int mins, int seco) { Calendar c = setCalendar(day, hour, mins, seco); c.set(Calendar.DAY_OF_MONTH, day); return c; } }