Here you can find the source of hasTime(Calendar cal)
Parameter | Description |
---|---|
cal | calendar to check |
public static boolean hasTime(Calendar cal)
//package com.java2s; //License from project: Apache License import java.util.Calendar; public class Main { /**/*from www .j a v a 2 s . c om*/ * Method to check whether hour, minute, second and millisecond fields are set * * @param cal calendar to check * @return true if we have a time */ public static boolean hasTime(Calendar cal) { boolean hasTime = cal.isSet(Calendar.HOUR_OF_DAY) && cal.isSet(Calendar.MINUTE) && cal.isSet(Calendar.SECOND) && cal.isSet(Calendar.MILLISECOND); return hasTime; } }