FileManDateTimeFormat { public static LocalDateTime parseLocalDateTime(String text) { PointInTime t = parse(text); if (t == null) return null; return t.toLocalDateTime(); } protected  FileManDateTimeFormat(); static DateTimeFormatter date(); static DateTimeFormatter time(); static DateTimeFormatter dateTime(); static PointInTimeFormatter pointInTimeParser(); static PointInTime parse(String text); static PointInTime toPointInTime(String text); static PointInTime parsePointInTime(String text); static LocalDateTime parseLocalDateTime(String text);  }
@Test public void testParseLocalDateTime() { LocalDateTime t = FileManDateTimeFormat.parseLocalDateTime("2750723.105614"); 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(0, t.getMillisOfSecond()); }
@Test public void testParseLocalDateTimeWithNullOrEmptyString() { Assert.assertNull(FileManDateTimeFormat.parseLocalDateTime(null)); Assert.assertNull(FileManDateTimeFormat.parseLocalDateTime("")); }