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

public class Thanksgiving extends Object implements Observance
Observance of Thanksgiving - a day to give thanks for the things one has at the close of the harvest season. This federal holiday is observed on the fourth Thursday in November. Proclaimed a national holiday by President Abraham Lincoln in 1863, it was originally declared for the last Thursday in November.

Note that this public holiday is similar to, but distinct from, the holiday of the same name in Canada.

Author:
Dave Joyce
  • Constructor Details

    • Thanksgiving

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