@Test void testGetLocalDateTimeStart() { assertThat(this.callog.getLocalDateTimeStart(this.event1), is(LocalDateTime.of(2015, 05, 29, 00, 00))); assertThat(this.callog.getLocalDateTimeStart(this.event2), is(LocalDateTime.of(2015, 05, 28, 15, 30))); }
public LocalDateTime getLocalDateTimeStart(Event event) { if (isAllDay(event)) { return LocalDateTime.parse(event.getStart().getDate().toString() + "T00:00:00.000", formatter); } return ZonedDateTime.parse(event.getStart().getDateTime().toString()) .withZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime(); }
CalendarLogic { public LocalDateTime getLocalDateTimeStart(Event event) { if (isAllDay(event)) { return LocalDateTime.parse(event.getStart().getDate().toString() + "T00:00:00.000", formatter); } return ZonedDateTime.parse(event.getStart().getDateTime().toString()) .withZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime(); } }
CalendarLogic { public LocalDateTime getLocalDateTimeStart(Event event) { if (isAllDay(event)) { return LocalDateTime.parse(event.getStart().getDate().toString() + "T00:00:00.000", formatter); } return ZonedDateTime.parse(event.getStart().getDateTime().toString()) .withZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime(); }  }
CalendarLogic { public LocalDateTime getLocalDateTimeStart(Event event) { if (isAllDay(event)) { return LocalDateTime.parse(event.getStart().getDate().toString() + "T00:00:00.000", formatter); } return ZonedDateTime.parse(event.getStart().getDateTime().toString()) .withZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime(); }  void setEvent(CalendarEvent calendarEvent); List<CalendarEvent> getEvents(int number); List<CalendarEvent> getEventsAt(LocalDateTime chosenDay); DateTime getDateTime(LocalDateTime ldt, int plusDays); static boolean isAllDay(Event event); LocalDateTime getLocalDateTimeStart(Event event); LocalDateTime getLocalDateTimeEnd(Event event); }
CalendarLogic { public LocalDateTime getLocalDateTimeStart(Event event) { if (isAllDay(event)) { return LocalDateTime.parse(event.getStart().getDate().toString() + "T00:00:00.000", formatter); } return ZonedDateTime.parse(event.getStart().getDateTime().toString()) .withZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime(); }  void setEvent(CalendarEvent calendarEvent); List<CalendarEvent> getEvents(int number); List<CalendarEvent> getEventsAt(LocalDateTime chosenDay); DateTime getDateTime(LocalDateTime ldt, int plusDays); static boolean isAllDay(Event event); LocalDateTime getLocalDateTimeStart(Event event); LocalDateTime getLocalDateTimeEnd(Event event);  }