java.lang.Object
org.holiday.calendar.observance.AbstractObservance
org.holiday.calendar.observance.islamic.mena.Ashura
All Implemented Interfaces:
Function<Integer,LocalDate>, Predicate<Integer>, Observance

public class Ashura extends AbstractObservance
Observance of Ashura (10 Muharram AH), the first day of the two-day Ashura public holiday in Bahrain.

Ashura marks the 10th day of Muharram and is of particular significance for Shia Muslims. Bahrain, which has a large Shia Muslim population, gazetted it as a two-day national public holiday (10–11 Muharram). The Central Bank of Bahrain (CBB) and Boursa Bahrain observe both days as closure days.

Dates are determined by official moon sighting and cannot be computed algorithmically. Dates for 2024–2026 are sourced from official CBB / Boursa Bahrain holiday announcements. Dates for 2027–2055 are projected as 10 Muharram (Islamic New Year + 9 days) from the Umm al-Qura tabular Islamic calendar; verify against official CBB announcements as each year is published.

The second day of Ashura (11 Muharram) is provided by AshuraDay2.

Date data is loaded at runtime from ashura-{countryCode}.csv in this package, where countryCode is the ISO 3166-1 alpha-2 country code in lower case (e.g. bh).

Author:
Dave Joyce
  • Constructor Details

    • Ashura

      public Ashura(String countryCode)
  • Method Details

    • computeDate

      protected LocalDate computeDate(int year)
      Description copied from class: AbstractObservance
      Compute the date for this observance in the given year. Only called when AbstractObservance.isValidYear(int) returns true.
      Specified by:
      computeDate in class AbstractObservance
      Parameters:
      year - the year for which to compute the date
      Returns:
      computed holiday date
    • isValidYear

      protected boolean isValidYear(int year)
      Description copied from class: AbstractObservance
      Determine whether this observance applies in the given year. Defaults to true (all years are valid).
      Overrides:
      isValidYear in class AbstractObservance
      Parameters:
      year - the year to test
      Returns:
      true if this observance applies