holidays.countries.heard_island_and_mcdonald_islands

HeardIslandAndMcDonaldIslands(years=None, expand=True, observed=True, subdiv=None, prov=None, state=None, language=None, categories=None)

Bases: NoHolidayBase

Heard Island and McDonald Islands holidays.

References
Parameters:
  • years (YearArg | None, default: None ) –

    The year(s) to pre-calculate public holidays for at instantiation.

  • expand (bool, default: True ) –

    Whether the entire year is calculated when one date from that year is requested.

  • observed (bool, default: True ) –

    Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn't work for all countries.

  • subdiv (str | None, default: None ) –

    The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • prov (str | None, default: None ) –

    deprecated use subdiv instead.

  • state (str | None, default: None ) –

    deprecated use subdiv instead.

  • language (str | None, default: None ) –

    Specifies the language in which holiday names are returned.

    Accepts either:

    • A two-letter ISO 639-1 language code (e.g., 'en' for English, 'fr' for French), or
    • A language and entity combination using an underscore (e.g., 'en_US' for U.S. English, 'pt_BR' for Brazilian Portuguese).

    Warning

    The provided language or locale code must be supported by the holiday entity. Unsupported values will result in names being shown in the entity's original language.

    If not explicitly set (language=None), the system attempts to infer the language from the environment's locale settings. The following environment variables are checked, in order of precedence: LANGUAGE, LC_ALL, LC_MESSAGES, LANG.

    If none of these are set or they are empty, holiday names will default to the original language of the entity's holiday implementation.

    Warning

    This fallback mechanism may yield inconsistent results across environments (e.g., between a terminal session and a Jupyter notebook).

    To ensure consistent behavior, it is recommended to set the language parameter explicitly. If the specified language is not supported, holiday names will remain in the original language of the entity's holiday implementation.

    This behavior will be updated and formalized in v1.

  • categories (CategoryArg | None, default: None ) –

    Requested holiday categories.

Returns:
  • None

    A HolidayBase object matching the country or market.

country = 'HM' class-attribute instance-attribute

HM(years=None, expand=True, observed=True, subdiv=None, prov=None, state=None, language=None, categories=None)

Bases: HeardIslandAndMcDonaldIslands

Parameters:
  • years (YearArg | None, default: None ) –

    The year(s) to pre-calculate public holidays for at instantiation.

  • expand (bool, default: True ) –

    Whether the entire year is calculated when one date from that year is requested.

  • observed (bool, default: True ) –

    Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn't work for all countries.

  • subdiv (str | None, default: None ) –

    The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • prov (str | None, default: None ) –

    deprecated use subdiv instead.

  • state (str | None, default: None ) –

    deprecated use subdiv instead.

  • language (str | None, default: None ) –

    Specifies the language in which holiday names are returned.

    Accepts either:

    • A two-letter ISO 639-1 language code (e.g., 'en' for English, 'fr' for French), or
    • A language and entity combination using an underscore (e.g., 'en_US' for U.S. English, 'pt_BR' for Brazilian Portuguese).

    Warning

    The provided language or locale code must be supported by the holiday entity. Unsupported values will result in names being shown in the entity's original language.

    If not explicitly set (language=None), the system attempts to infer the language from the environment's locale settings. The following environment variables are checked, in order of precedence: LANGUAGE, LC_ALL, LC_MESSAGES, LANG.

    If none of these are set or they are empty, holiday names will default to the original language of the entity's holiday implementation.

    Warning

    This fallback mechanism may yield inconsistent results across environments (e.g., between a terminal session and a Jupyter notebook).

    To ensure consistent behavior, it is recommended to set the language parameter explicitly. If the specified language is not supported, holiday names will remain in the original language of the entity's holiday implementation.

    This behavior will be updated and formalized in v1.

  • categories (CategoryArg | None, default: None ) –

    Requested holiday categories.

Returns:
  • None

    A HolidayBase object matching the country or market.

HMD(years=None, expand=True, observed=True, subdiv=None, prov=None, state=None, language=None, categories=None)

Bases: HeardIslandAndMcDonaldIslands

Parameters:
  • years (YearArg | None, default: None ) –

    The year(s) to pre-calculate public holidays for at instantiation.

  • expand (bool, default: True ) –

    Whether the entire year is calculated when one date from that year is requested.

  • observed (bool, default: True ) –

    Whether to include the dates when public holiday are observed (e.g. a holiday falling on a Sunday being observed the following Monday). This doesn't work for all countries.

  • subdiv (str | None, default: None ) –

    The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • prov (str | None, default: None ) –

    deprecated use subdiv instead.

  • state (str | None, default: None ) –

    deprecated use subdiv instead.

  • language (str | None, default: None ) –

    Specifies the language in which holiday names are returned.

    Accepts either:

    • A two-letter ISO 639-1 language code (e.g., 'en' for English, 'fr' for French), or
    • A language and entity combination using an underscore (e.g., 'en_US' for U.S. English, 'pt_BR' for Brazilian Portuguese).

    Warning

    The provided language or locale code must be supported by the holiday entity. Unsupported values will result in names being shown in the entity's original language.

    If not explicitly set (language=None), the system attempts to infer the language from the environment's locale settings. The following environment variables are checked, in order of precedence: LANGUAGE, LC_ALL, LC_MESSAGES, LANG.

    If none of these are set or they are empty, holiday names will default to the original language of the entity's holiday implementation.

    Warning

    This fallback mechanism may yield inconsistent results across environments (e.g., between a terminal session and a Jupyter notebook).

    To ensure consistent behavior, it is recommended to set the language parameter explicitly. If the specified language is not supported, holiday names will remain in the original language of the entity's holiday implementation.

    This behavior will be updated and formalized in v1.

  • categories (CategoryArg | None, default: None ) –

    Requested holiday categories.

Returns:
  • None

    A HolidayBase object matching the country or market.