Class TimeWindow


  • public class TimeWindow
    extends Object
    This class represents a window of time for selected hours, days and dates.
    Author:
    mpolden
    • Method Detail

      • days

        public List<DayOfWeek> days()
        Returns days in this time window
      • hours

        public List<Integer> hours()
        Returns hours in this time window
      • zone

        public ZoneId zone()
        Returns the time zone of this time window
      • includes

        public boolean includes​(Instant instant)
        Returns whether the given instant is in this time window
      • from

        public static TimeWindow from​(String daySpec,
                                      String hourSpec,
                                      String zoneSpec,
                                      String dateStart,
                                      String dateEnd)
        Parse a time window from the given day, hour and time zone specification