Class NationalDayForTruthAndReconciliation

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

public class NationalDayForTruthAndReconciliation extends Object implements Observance
Observance of the National Day for Truth and Reconciliation - a federal statutory holiday on 30 September, honouring the survivors and victims of Canada's Indian residential school system and acknowledging the ongoing impacts on Indigenous communities.

This holiday was established by the federal government and first observed on 30 September 2021. It is a rollable holiday: when 30 September falls on a Saturday or Sunday, it is observed the following Monday under Canada's federal following-Monday substitution rule.

This class is implemented as a Observance rather than a fixed MonthDay in order to enforce the year constraint via test(Integer), since FixedHoliday does not support year gating.

Author:
Dave Joyce
  • Constructor Details

    • NationalDayForTruthAndReconciliation

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