Class SpringBankHoliday

java.lang.Object
org.holiday.calendar.observance.uk.SpringBankHoliday
All Implemented Interfaces:
Function<Integer,LocalDate>, Predicate<Integer>, Observance

public class SpringBankHoliday extends Object implements Observance
Observance of Spring or Late May bank holiday - a statutory bank holiday in the United Kingdom since 1971. In years when a Jubilee is celebrated for the anniversary of the accession of the sovereign, this holiday's observed date is adjusted to adjoin the Jubilee bank holiday to create a 4-day weekend.
Author:
Dave Joyce
  • Constructor Details

    • SpringBankHoliday

      public SpringBankHoliday()
  • Method Details

    • apply

      public LocalDate apply(Integer year)
      Specified by:
      apply in interface Function<Integer,LocalDate>
    • test

      public boolean test(Integer year)
      Description copied from interface: Observance
      Determines whether this observance applies to the specified year.
      Specified by:
      test in interface Observance
      Specified by:
      test in interface Predicate<Integer>
      Parameters:
      year - year of potential observance
      Returns:
      true if the input year applies for this observance, otherwise false