public static DvTime getDvTime(Calendar cal) { return new DvTime( cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), cal.getTimeZone()); } }
private static DvTime create(DvTime dvTime, String attributeName, Object value) throws InternalErrorException { Calendar cal = Calendar.getInstance(); setCalendar(cal, Calendar.HOUR_OF_DAY, attributeName, (Integer) value, "hour", dvTime.getHour()); setCalendar(cal, Calendar.MINUTE, attributeName, (Integer) value, "minute", dvTime.getMinute()); setCalendar(cal, Calendar.SECOND, attributeName, (Integer) value, "second", dvTime.getSecond()); TimeZone timeZone = Calendar.getInstance().getTimeZone(); return new DvTime( cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), cal.get(Calendar.SECOND), timeZone); }
@Override public DvTime add(DvDuration q) { if (!getDiffType().isInstance(q)) { throw new IllegalArgumentException("invalid difference type"); } DvDuration d = (DvDuration) q; MutableDateTime mdate = getDateTime().toMutableDateTimeISO(); mdate.add(d.getPeriod()); return new DvTime(getOtherReferenceRanges(), getNormalRange(), getNormalStatus(), getAccuracy(), getMagnitudeStatus(), mdate .toDateTimeISO(), this.toString()); }
@Override public DvTime add(DvDuration q) { if (!getDiffType().isInstance(q)) { throw new IllegalArgumentException("invalid difference type"); } DvDuration d = (DvDuration) q; MutableDateTime mdate = getDateTime().toMutableDateTimeISO(); mdate.add(d.getPeriod()); return new DvTime(getOtherReferenceRanges(), getNormalRange(), getNormalStatus(), getAccuracy(), getMagnitudeStatus(), mdate .toDateTimeISO(), this.toString()); }
/** * Parses a string value and return a DvTime */ public DvTime parse(String value) { DateTime time = DvDateTimeParser.parseTime(value); return new DvTime(time.getHourOfDay(), time.getMinuteOfHour(), time.getSecondOfMinute(), time.getMillisOfSecond(), time.getZone().toTimeZone()); }
/** * Parses a string value and return a DvTime */ public DvTime parse(String value) { DateTime time = DvDateTimeParser.parseTime(value); return new DvTime(time.getHourOfDay(), time.getMinuteOfHour(), time.getSecondOfMinute(), time.getMillisOfSecond(), time.getZone().toTimeZone()); }
{if (true) return new DvTime(t.image);} } catch(Exception e) { {if (true) throw new ParseException("wrong date format: " + t.image);}
{if (true) return new DvTime(t.image);} } catch(Exception e) { {if (true) throw new ParseException("wrong date format: " + t.image);}
{if (true) return new DvTime(t.image);}
{if (true) return new DvTime(t.image);}