Code example for GregorianCalendar

Methods: beforegetsetadd

0
	} 
 
	// アラーム時間取得 
	private GregorianCalendar getAlermDate() {
		Integer[] config_time = getAlermtime();
		GregorianCalendar cal = new GregorianCalendar();
		cal.set(GregorianCalendar.HOUR_OF_DAY, config_time[0]);
		cal.set(GregorianCalendar.MINUTE, config_time[1]);
		cal.set(GregorianCalendar.SECOND, 0);
		cal.set(GregorianCalendar.MILLISECOND, 0);
		if (cal.before(new GregorianCalendar())) {
			cal.add(GregorianCalendar.DAY_OF_MONTH, 1);
		} 
//		// for debug ------------------------------------- 
//		cal = new GregorianCalendar(); 
//		cal.add(GregorianCalendar.SECOND, 20); 
//		// for debug ------------------------------------- 
		Logger.debug("getAlermDate: " + cal.get(GregorianCalendar.HOUR_OF_DAY) + ":" + cal.get(GregorianCalendar.MINUTE) + ":" + cal.get(GregorianCalendar.SECOND));
		return cal;
	} 
 
} 
Experience pair programming with AI  Get Codota for Java