HL7DateTimeFormat { public static LocalDateTime toLocalDateTime(String text) { return toPointInTime(text).toLocalDateTime(); } protected  HL7DateTimeFormat(); static DateTimeFormatter dateTime(); static DateTimeFormatter forPointInTime(PointInTime t); static DateTimeFormatter forPrecision(Precision p); static PointInTimeFormatter pointInTimeParser(); static PointInTime parse(String text); static PointInTime toPointInTime(String text); static LocalDateTime toLocalDateTime(String text);  }
@Test public void testParseLocalDateTime() { LocalDateTime t = HL7DateTimeFormat.toLocalDateTime("19750723105614.123"); Assert.assertEquals(1975, t.getYear()); Assert.assertEquals(7, t.getMonthOfYear()); Assert.assertEquals(23, t.getDayOfMonth()); Assert.assertEquals(10, t.getHourOfDay()); Assert.assertEquals(56, t.getMinuteOfHour()); Assert.assertEquals(14, t.getSecondOfMinute()); Assert.assertEquals(123, t.getMillisOfSecond()); }