/** * Returns the minute as an integer. */ public int getMinute() { int minute = 0; if (tm != null) { minute = tm.getMinute(); } //end if return minute; } //end method
/** * Returns the minute as an integer. */ public int getMinute() { int minute = 0; if (tm != null) { minute = tm.getMinute(); } //end if return minute; } //end method
/** * Returns the minute as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getMinute() throws DataTypeException { return getDetail().getMinute(); }
/** * Returns the minute as an integer. * @throws DataTypeException if the value is incorrectly formatted. If validation is enabled, this * exception should be thrown at setValue(), but if not, detailed parsing may be deferred until * this method is called. */ public int getMinute() throws DataTypeException { return getDetail().getMinute(); }
/** * <p>Return the value as a calendar object.</p> * * <b>Note that only the time component of the return value is set to * the value from this object. Returned value will have today's date</b> * @since 1.1 */ public Calendar getValueAsCalendar() { int gmtOff = getGMTOffset(); Calendar retVal; if (gmtOff != GMT_OFFSET_NOT_SET_VALUE && !omitOffsetFg) { int hrOffset = gmtOff / 100; int minOffset = Math.abs(gmtOff % 100); String timeZone = String.format("GMT%+d:%02d", hrOffset, minOffset); retVal = new GregorianCalendar(TimeZone.getTimeZone(timeZone)); } else { retVal = Calendar.getInstance(); } retVal.set(Calendar.HOUR_OF_DAY, getHour()); retVal.set(Calendar.MINUTE, getMinute()); retVal.set(Calendar.SECOND, getSecond()); float fractSecond = getFractSecond(); retVal.set(Calendar.MILLISECOND, (int) Math.round(fractSecond * 1000.0)); return retVal; }
/** * <p>Return the value as a calendar object.</p> * * <b>Note that only the time component of the return value is set to * the value from this object. Returned value will have today's date</b> * @since 1.1 */ public Calendar getValueAsCalendar() { int gmtOff = getGMTOffset(); Calendar retVal; if (gmtOff != GMT_OFFSET_NOT_SET_VALUE && !omitOffsetFg) { int hrOffset = gmtOff / 100; int minOffset = Math.abs(gmtOff % 100); String timeZone = String.format("GMT%+d:%02d", hrOffset, minOffset); retVal = new GregorianCalendar(TimeZone.getTimeZone(timeZone)); } else { retVal = Calendar.getInstance(); } retVal.set(Calendar.HOUR_OF_DAY, getHour()); retVal.set(Calendar.MINUTE, getMinute()); retVal.set(Calendar.SECOND, getSecond()); float fractSecond = getFractSecond(); retVal.set(Calendar.MILLISECOND, (int) Math.round(fractSecond * 1000.0)); return retVal; }