Class DaysOfWeekTimeWindows

    • Method Detail

      • timeMsUntilTargetTimeIntervalEnd

         final Long timeMsUntilTargetTimeIntervalEnd(Long dayTimeOffsetMillis)
        Parameters:
        dayTimeOffsetMillis - number of milliseconds elapsed from the beginning of the day, think about this as LocalTime raw representation
        Returns:

        a positive value if there is a configured time window which contains the given point of time. Returned value contains a number of milliseconds beofre the time window end;

        non-positive value as an indication that given point of time doesn't belong to any
        configured time window
      • timeMsUntilTargetTimeIntervalStart

         final Long timeMsUntilTargetTimeIntervalStart(Long dayTimeOffestMillis)
        Returns:

        a positive value if there is a configured time window which starts after the given point of time. Returned value contains a number of milliseconds before that time window;

        zero as an indication that there is a configured time window which contains given point of time;
        
        negative value as an indication that there is no time window which contains given point of time
        or starts after it