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

public class VictoriaDay extends Object implements Observance
Observance of Victoria Day - a federal Canadian public holiday on the last Monday in May preceding May 25, celebrated as the official birthday of the sovereign of Canada. The holiday, a distinctly Canadian observance (as opposed to other realms of the Crown), originally fell on Queen Victoria's actual birthday (May 24).

This holiday has been observed in Canada since 1845. It falls on the Monday between the 18th and the 24th (inclusive), and it is therefore always the next to last Monday of May.

Author:
Dave Joyce
  • Constructor Details

    • VictoriaDay

      public VictoriaDay()
  • 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