TagD extends TagW { public static LocalDateTime getDicomDateTime(TimeZone tz, String value) { return getDicomDateTime(tz, value, false); } TagD(int tagID);  TagD(int tagID, int vmMax);  TagD(int tagID, int vmMin, int vmMax);  TagD(int tagID, int vmMin, int vmMax, Object defaultValue);  TagD(int tagID, String privateCreatorID);  TagD(int tagID, String privateCreatorID, int vmMin, int vmMax, Object defaultValue);  TagD(int tagID, String displayedName, String privateCreatorID, int vmMin, int vmMax, Object defaultValue);  TagD(int tagID, String keyword, String displayedName, String privateCreatorID, VR vr, int vmMin, int vmMax,
        Object defaultValue, boolean retired); private  TagD(int tagID, String displayedName, String privateCreatorID, VR vr, int vmMin, int vmMax,
        Object defaultValue); VR getValueRerpesentation(); int getDicomValueMultiplicity(Object value); @Override int hashCode(); @Override boolean equals(Object obj); @Override Object getValue(Object data); @Override boolean isStringFamilyType(); @Override String getFormattedTagValue(Object value, String format); static TagW get(String keyword); static String getKeywordFromTag(int tagID, String privateCreatorID); static TagW get(int tagID); static TagW get(int tagID, String privateCreatorID); static TagW getNullable(int tagID); static TagW getNullable(int tagID, String privateCreatorID); static Object getTagValue(TagReadable tagable, int tagID); static T getTagValue(TagReadable tagable, int tagID, Class<T> type); static TagW[] getTagFromIDs(int... tagID); static TagW getUID(Level level); static LocalDate getDicomDate(String date); static LocalTime getDicomTime(String time); static LocalDateTime getDicomDateTime(TimeZone tz, String value); static LocalDateTime getDicomDateTime(TimeZone tz, String value, boolean ceil); static LocalDateTime dateTime(long dateTimeID, Attributes attributes); static LocalDateTime dateTime(int dateID, int timeID, TagReadable tagable); static String formatDicomDate(LocalDate date); static String formatDicomTime(LocalTime time); static TemporalAccessor getDateFromElement(XMLStreamReader xmler, String attribute, TagType type,
        TemporalAccessor defaultValue); static TemporalAccessor[] getDatesFromElement(XMLStreamReader xmler, String attribute, TagType type,
        TemporalAccessor[] defaultValue); static TemporalAccessor[] getDatesFromElement(XMLStreamReader xmler, String attribute, TagType type,
        TemporalAccessor[] defaultValue, String separator); static String getDicomPeriod(String value); static String getDicomPersonName(String name); static String getDicomPatientSex(String val);  }
@Test public void testGetDicomDateTime() throws Exception { Date date = DateUtils.parseDA(null, "1993:08:22"); LocalDateTime datetime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); assertEquals(LocalDate.of(1993, 8, 22), datetime.toLocalDate()); DatePrecision precision = new DatePrecision(); date = DateUtils.parseTM(null, "070907.07 ", precision); datetime = LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault()); assertEquals(LocalTime.of(7, 9, 7, 70_000_000), datetime.toLocalTime()); LocalDateTime time = TagD.getDicomDateTime(null, "1953082711"); assertEquals(LocalDateTime.of(1953, 8, 27, 11, 0), time); time = TagD.getDicomDateTime(null,"19530827111300"); assertEquals(LocalDateTime.of(1953, 8, 27, 11, 13, 0), time); time = TagD.getDicomDateTime(null,"19530827111300.0"); assertEquals(LocalDateTime.of(1953, 8, 27, 11, 13, 0), time); time = TagD.getDicomDateTime(null,"19530827111300.005"); assertEquals(LocalDateTime.of(1953, 8, 27, 11, 13, 0, 5_000_000), time); }