public IsoTime(String h, String m, String s, String ms) { if (h != null) { hour = Integer.parseInt(h); } if (m != null) { minute = Integer.parseInt(m); } if (s != null) { second = Integer.parseInt(s); } if (ms != null) { millis = Integer.parseInt(s); } initBase(); }
public IsoTime(Number h, Number m, Number s, Number ms, Number halfday) { this.hour = (h != null)? h.intValue():-1; this.minute = (m != null)? m.intValue():-1; this.second = (s != null)? s.intValue():-1; this.millis = (ms != null)? ms.intValue():-1; this.halfday = (halfday != null)? halfday.intValue():-1; initBase(); }
public IsoTime(String h, String m, String s, String ms) { if (h != null) { hour = Integer.parseInt(h); } if (m != null) { minute = Integer.parseInt(m); } if (s != null) { second = Integer.parseInt(s); } if (ms != null) { millis = Integer.parseInt(s); } initBase(); }
public IsoTime(String h, String m, String s, String ms) { if (h != null) { hour = Integer.parseInt(h); } if (m != null) { minute = Integer.parseInt(m); } if (s != null) { second = Integer.parseInt(s); } if (ms != null) { millis = Integer.parseInt(s); } /* String h2 = (hour >= 0)? String.format("%02d", hour): PAD_FIELD_UNKNOWN2; String m2 = (minute >= 0)? String.format("%02d", minute): PAD_FIELD_UNKNOWN2; String s2 = (second >= 0)? String.format("%02d", second): PAD_FIELD_UNKNOWN2; String ms2 = (millis >= 0)? String.format(".%04d", millis): ""; isoTimeString = "T" + h2 + ":" + m2 + ":" + s2 + ms2; */ initBase(); }
public IsoTime(String h, String m, String s, String ms) { if (h != null) { hour = Integer.parseInt(h); } if (m != null) { minute = Integer.parseInt(m); } if (s != null) { second = Integer.parseInt(s); } if (ms != null) { millis = Integer.parseInt(s); } initBase(); }
public IsoTime(int h, int m, int s, int ms, int halfday) { this.hour = h; this.minute = m; this.second = s; this.millis = ms; this.halfday = halfday; // Some error checks second += millis / 1000; millis = millis % 1000; minute += second / 60; second = second % 60; hour += hour / 60; minute = minute % 60; // Error checks done initBase(); }
public IsoTime(int h, int m, int s, int ms) { this.hour = h; this.minute = m; this.second = s; this.millis = ms; /* String h2 = (hour >= 0)? String.format("%02d", hour): PAD_FIELD_UNKNOWN2; String m2 = (minute >= 0)? String.format("%02d", minute): PAD_FIELD_UNKNOWN2; String s2 = (second >= 0)? String.format("%02d", second): PAD_FIELD_UNKNOWN2; String ms2 = (millis >= 0)? String.format(".%04d", millis): ""; isoTimeString = "T" + h2 + ":" + m2 + ":" + s2 + ms2; */ initBase(); }
public IsoTime(int h, int m, int s, int ms, int halfday) { this.hour = h; this.minute = m; this.second = s; this.millis = ms; this.halfday = halfday; initBase(); }
public IsoTime(int h, int m, int s, int ms, int halfday) { this.hour = h; this.minute = m; this.second = s; this.millis = ms; this.halfday = halfday; // Some error checks second += millis / 1000; millis = millis % 1000; minute += second / 60; second = second % 60; hour += hour / 60; minute = minute % 60; // Error checks done initBase(); }