Class BitwardsSchedule.ExceptionDay

java.lang.Object
fi.bitwards.service.BitwardsSchedule.ExceptionDay
Enclosing class:
BitwardsSchedule

public static final class BitwardsSchedule.ExceptionDay extends Object
Represents an exception day with alternative access times, which overrule regular rules.

Example exception day: 2021-12-25 (no access on Christmas day)

  • exceptionDate: Date instance 2021-12-25 00:00:00, where year, month and day of month are meaningful; ignore time part
  • startingTime: -1 (not specified; no access)
  • endingTime: -1 (not specified; no access)

Example exception day. 2021-12-24 from 9:15 to 13:15

  • exceptionDate: Date instance 2021-12-24 00:00:00, where year, month and day of month are meaningful; ignore time part
  • startingTime: 555, inclusive (minutes since midnight, i.e., 9:15)
  • endingTime: 795, exclusive (minutes since midnight, i.e., 13:15)

  • Method Details

    • getName

      public String getName()
      Get the name of the exception day.
      Returns:
      the name of the exception; null if exception day does not have a name.
    • getExceptionDate

      public Date getExceptionDate()
      Get the exception date. Only the year, month, and day of month are meaningful. The time of day should be ignored (it usually is midnight, i.e., 0:00:00).
      Returns:
      the exception date
    • getStartingTime

      public int getStartingTime()
      Get starting time of day when access is granted, inclusive.
      Returns:
      the start time as minutes since midnight
    • getEndingTime

      public int getEndingTime()
      Get ending time of day when access is granted, exclusive.
      Returns:
      the ending time as minutes since midnight