holidays.countries.pakistan

Classes

PAK(*args, **kwargs)

param years:

PK(*args, **kwargs)

param years:

Pakistan(*args, **kwargs)

param years:

PakistanIslamicHolidays()

class holidays.countries.pakistan.Pakistan(*args, **kwargs)

Bases: HolidayBase, InternationalHolidays, IslamicHolidays

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

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

  • observed – 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 – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

country: str = 'PK'

The country’s ISO 3166-1 alpha-2 code.

class holidays.countries.pakistan.PK(*args, **kwargs)

Bases: Pakistan

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

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

  • observed – 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 – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

class holidays.countries.pakistan.PAK(*args, **kwargs)

Bases: Pakistan

Parameters:
  • years – The year(s) to pre-calculate public holidays for at instantiation.

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

  • observed – 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 – The subdivision (e.g. state or province) as a ISO 3166-2 code or its alias; not implemented for all countries (see documentation).

  • provdeprecated use subdiv instead.

  • statedeprecated use subdiv instead.

  • language – The language which the returned holiday names will be translated into. It must be an ISO 639-1 (2-letter) language code. If the language translation is not supported the original holiday names will be used.

  • categories – Requested holiday categories.

Returns:

A HolidayBase object matching the country.

class holidays.countries.pakistan.PakistanIslamicHolidays

Bases: _CustomIslamicHolidays

ASHURA_DATES_CUSTOM_CALENDAR = {2005: (2, 18), 2006: (2, 8), 2007: (1, 28), 2008: (1, 18), 2009: ((1, 6), (12, 26)), 2010: (12, 16), 2011: (12, 5), 2012: (11, 23), 2013: (11, 13), 2014: (11, 3), 2015: (10, 23), 2016: (10, 11), 2017: (9, 30), 2018: (9, 21), 2019: (9, 9), 2020: (8, 29), 2021: (8, 18), 2022: (8, 9)}
EID_AL_ADHA_DATES_CUSTOM_CALENDAR = {2005: (1, 21), 2006: ((1, 10), (12, 31)), 2007: (12, 20), 2008: (12, 9), 2009: (11, 28), 2010: (11, 17), 2011: (11, 7), 2012: (10, 26), 2013: (10, 15), 2014: (10, 6), 2015: (9, 24), 2016: (9, 12), 2017: (9, 2), 2018: (8, 22), 2019: (8, 12), 2020: (7, 31), 2021: (7, 21), 2022: (7, 10), 2023: (6, 29)}
EID_AL_FITR_DATES_CUSTOM_CALENDAR = {2005: (11, 4), 2006: (10, 24), 2007: (10, 13), 2008: (10, 2), 2009: (9, 21), 2010: (9, 10), 2011: (8, 31), 2012: (8, 19), 2013: (8, 8), 2014: (7, 29), 2015: (7, 17), 2016: (7, 6), 2017: (6, 26), 2018: (6, 16), 2019: (6, 5), 2020: (5, 24), 2021: (5, 13), 2022: (5, 3), 2023: (4, 22), 2024: (4, 10)}
MAWLID_DATES_CUSTOM_CALENDAR = {2005: (4, 22), 2006: (4, 11), 2007: (3, 31), 2008: (3, 21), 2009: (3, 9), 2010: (3, 1), 2011: (2, 17), 2012: (2, 5), 2013: (1, 24), 2014: (1, 14), 2015: (1, 4), 2016: (12, 12), 2017: (12, 1), 2018: (11, 21), 2019: (11, 10), 2020: (10, 30), 2021: (10, 19), 2022: (10, 9)}