public Date getDate(String privateCreator, int tag, int valueIndex, Date defVal) { return getDate(privateCreator, tag, null, valueIndex, defVal, new DatePrecision()); }
public Date getDate(String privateCreator, int tag, VR vr, int valueIndex, Date defVal) { return getDate(privateCreator, tag, vr, valueIndex, defVal, new DatePrecision()); }
public Date getDate(String privateCreator, int tag, int valueIndex) { return getDate(privateCreator, tag, null, valueIndex, null, new DatePrecision()); }
public Date getDate(String privateCreator, int tag, VR vr, int valueIndex) { return getDate(privateCreator, tag, vr, valueIndex, null, new DatePrecision()); }
public Date getDate(String privateCreator, int tag, VR vr) { return getDate(privateCreator, tag, vr, 0, null, new DatePrecision()); }
public Date getDate(int tag, Date defVal) { return getDate(null, tag, null, 0, defVal, new DatePrecision()); }
public Date getDate(String privateCreator, int tag) { return getDate(privateCreator, tag, null, 0, null, new DatePrecision()); }
public void setDate(String privateCreator, long tag, Date dt) { setDate(privateCreator, tag, new DatePrecision(), dt); }
public Object setDate(String privateCreator, int tag, VR vr, Date... ds) { return setDate(privateCreator, tag, vr, new DatePrecision(), ds); }
public Date getDate(int tag, int valueIndex, Date defVal) { return getDate(null, tag, null, valueIndex, defVal, new DatePrecision()); }
public Date getDate(long tag, Date defVal) { return getDate(null, tag, defVal, new DatePrecision()); }
public static String formatTM(TimeZone tz, Date date) { return formatTM(tz, date, new DatePrecision()); }
public Date getDate(int tag) { return getDate(null, tag, null, 0, null, new DatePrecision()); }
public Date getDate(String privateCreator, int tag, VR vr, Date defVal) { return getDate(privateCreator, tag, vr, 0, defVal, new DatePrecision()); }
public Date getDate(long tag) { return getDate(null, tag, null, new DatePrecision()); }
public Object setDateRange(String privateCreator, int tag, VR vr, DateRange range) { return setDateRange(privateCreator, tag, vr, new DatePrecision(), range); }
public static String formatDT(TimeZone tz, Date date) { return formatDT(tz, date, new DatePrecision()); }
public static LocalDateTime getDicomDateTime(TimeZone tz, String value, boolean ceil) { if (StringUtil.hasText(value)) { try { Date date = DateUtils.parseDT(tz, value, ceil, new DatePrecision()); return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); } catch (Exception e) { LOGGER.error("Parse DICOM dateTime", e); //$NON-NLS-1$ } } return null; }
private String updateTimeZoneTM(TimeZone from, TimeZone to, String tm) { try { DatePrecision precision = new DatePrecision(); Date date = DateUtils.parseTM(from, tm, false, precision); tm = DateUtils.formatTM(to, date, precision); } catch (IllegalArgumentException e) {} return tm; }
private DateRange toDateRange(String s, VR vr) { String[] range = splitRange(s); TimeZone tz = getTimeZone(); DatePrecision precision = new DatePrecision(); Date start = range[0] == null ? null : vr.toDate(range[0], tz, 0, false, null, precision); Date end = range[1] == null ? null : vr.toDate(range[1], tz, 0, true, null, precision); return new DateRange(start, end); }