Giter Site home page Giter Site logo

gothenburgbitfactory / holidata Goto Github PK

View Code? Open in Web Editor NEW
42.0 10.0 11.0 732 KB

Holidata is the core of holidata.net, a no-nonsense, ad-free provider of international holiday data.

Home Page: https://holidata.net

License: MIT License

Python 100.00%
calendar holidays holiday-calculation holiday

holidata's Introduction

Holidata

holidata is a utility for algorithmically producing holiday data. Its purpose is mainly for holidata.net.

Holiday data can be produced for a given year in a supported locale and output format.

Usage

holidata --year=<value> --locale=<value> [--output=<value>]
holidata --year=<value> --country=<value> [--lang=<value>] [--output=<value>]

Call holidata with the --help option to more detailed information.

Examples

  • Create holiday data of year 2022 for locale de-DE:

    $ holidata --year=2022 --locale=de-DE
    
  • Create holiday data of year 2022 for country BE and language fr:

    $ holidata --year=2022 --country=BE --lang=fr
    
  • Create holiday data of year 2022 for country US (default language en):

    $ holidata --year=2022 --country=US
    

Data

For each holiday the following data is provided:

  • locale - language and country the holiday is defined for
  • region - region code of the given subdivision the holiday is defined for
  • date - actual date the holiday takes place
  • description - name of the holiday in the given language
  • type - holiday type flags
  • notes - additional information

Locales

Holidata provides holiday data in different locales, i.e. for a given country and in a given language. See holidata.net for a complete overview of the currently provided locales.

If you think a locale is missing, open a feature request on GitHub.

Output Formats

Holidata supports different output formats, currently csv, json, yaml, and xml.

If you think an output format is missing, open a feature request on GitHub.

Limitations

Holidata focuses on holidays which are defined by law on which business or work are suspended or reduced (there may be some exceptions to that rule).

Holidata only provides data for countries and their principal subdivisions (both as they are defined in ISO 3166). Holidays for other subdivisions are either merged or ignored. There is also no explicit representation of partial holidays.

License

holidata is released under the MIT license. For details check the LICENSE file.

holidata's People

Contributors

adrianocorrea avatar dependabot[bot] avatar flother avatar ghlecl avatar hikerspath avatar jorgeegomez avatar lauft avatar lldh avatar pbeckingham avatar recollir avatar tbabej avatar vice avatar zegnat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

holidata's Issues

Regional holidays marked as national in locale de-AT

Describe the bug
The following holidays have flag N (i.e. are national holidays) but have regions defined.

  • Which holidays are affected?
    03-19: [2,6,7,8] [NRF] Josef
    05-04: [4] [NF] Florian
    09-24: [5] [NF] Rupert
    10-10: [2] [NF] Tag der Volksabstimmung
    11-11: [1] [NF] Martin
    11-15: [9,3] [NF] Leopold
    
  • Which years does the bug affect?
    All years

Expected behavior
If a holiday has regions defined, it should not have flag N.

Add locale for es-EC

The following locale needs to be verified/completed:

class es_EC(Locale):
    """
    01-01: [NF] Año Nuevo
    05-01: [NF] Día del Trabajo
    05-24: [NF] Batalla del Pichincha
    08-10: [NF] Primer Grito de Independencia
    10-09: [NF] Independencia de Guayaquil
    11-02: [NF] Día de Difuntos
    11-03: [NF] Independencia de Cuenca
    12-25: [NRF] Navidad
    : [NV] Carnaval
    : [NRV] Viernes Santo
    """

    locale = "es-EC"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for pt-BR

The following locale needs to be verified/completed:

class pt_BR(Locale):
    u"""
    01-01: [NF] Confraternização Universal
    04-21: [NF] Tiradentes
    05-01: [NF] Dia do Trabalho
    09-07: [NF] Independência do Brasil
    10-12: [NRF] Nossa Senhora Aparecida
    11-02: [NRF] Finados
    11-15: [NF] Proclamação da República
    12-25: [NRF] Natal
    : [NRV] Carnaval
    : [NRV] Carnaval
    : [NRV] Sexta-feira Santa
    : [NRV] Páscoa
    : [NRV] Corpus Christi
    """

    locale = "pt-BR"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Wrong assignment of flag `N` in locales en-US and es-US

Describe the bug
The following holidays either have flag N (i.e. are national holidays) but have regions defined, or have no regions defined but lack the flag N.

  • Which holidays are affected?
    12-24: [RF] Christmas Eve
    3. monday in January: [V] Birthday of Martin Luther King, Jr.
    3. monday in April: [MA,ME] [NV] Patriots' Day
    4. friday in November: [V] Day after Thanksgiving
    
    the same holds for the spanish locale (es-US).
  • Which years does the bug affect?
    All years

Expected behavior
If a holiday has regions defined, it should not have flag N and vice versa.

Add locale for hu-HU

Basic information

  • What is the language code according to ISO 639-1? hu
  • What is the country code according to ISO 3166-2? HU

(please replace LANG and COUNTRY in the issue title accordingly)

  • Provide a list of all holidays, i.e. days "which are defined by law on which business or work are suspended or reduced" https://www.timeanddate.com/holidays/hungary/
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...? If yes, which holidays and what is the algorithm? no
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...? If yes, which holidays and what is the algorithm? no
  • If possible, provide the legal sources which define the holidays. https://www.timeanddate.com/holidays/hungary/

For each holiday

  • What is the official name?
  • Is it a regional or nation-wide holiday?
  • If regional, what are the regions the holiday is observed in? (Note: currently only regions defined in ISO_3166-2 are supported)
  • Is it a fixed or variable date?
  • If fixed, provide the date in format MM-DD
  • If a holiday has a variable date: What is the algorithm to calculate it (e.g. nth <weekday>/<day> in <month>,...? If it depends on the easter date: Is it the western or orthodox easter date?
  • If the holiday is proclaimed by the government: Can you provide the source?

How do you generate (German) holiday information?

The data on holidata.net is outdated. Can you update the data or give me a hint how to generate holiday data by myself?

I tried cloning the repo, and following the installation instructions. But it seems like the CPP code doesn't do the generation.

So I tried to run the python code, but it doesn't contain the classes for German holiday data. Can you provide those? Is that the correct way to build data that holidata.net hosts?

I also saw GothenburgBitFactory/taskwarrior#2173 and question if that's the correct way how to insert holiday information into taskwarrior? Is it? If yes, why wasn't the PR merged and if no, why does the outdated data remain in the doc/rc package?

I'd be glad if you could answer my question and help me save my problem, thx! Btw. I really enjoy using taskwarrior and timew - these tools are awesome.

Add locale for fi-FI

The following locale needs to be verified/completed:

class fi_FI(Locale):
    """
    01-01: [NF] Uudenvuodenpäivä
    01-06: [NRF] Loppiainen
    05-01: [NF] Vappu
    12-06: [NF] Itsenäisyyspäivä
    12-24: [NRF] Jouluaatto
    12-25: [NRF] Joulupäivä
    12-26: [NRF] 2. joulupäivä
    2 days before Easter: [NRV] Pitkäperjantai
    Easter: [NRV] Pääsiäispäivä
    1 day after Easter: [NRV] 2. pääsiäispäivä
    39 days after Easter: [NRV] Helatorstai
    49 days after Easter: [NRV] Helluntaipäivä
    : [NV] Juhannusaatto
    : [NV] Juhannuspäivä
    : [NV] Pyhäinpäivä
    """

    locale = "fi-FI"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for tr-TR

The following locale needs to be completed/verified:

class tr_TR(Locale):
    """
    01-01: [NF] Yılbaşı
    04-23: [NF] Ulusal Egemenlik ve Çocuk Bayramı
    05-01: [NF] Emek ve Dayanışma Günü
    05-19: [NF] Atatürk'ü Anma Gençlik ve Spor Bayramı
    08-30: [NF] Zafer Bayramı
    10-29: [NF] Cumhuriyet Bayramı
    : [NRV] Ramazan Bayramı 1
    : [NRV] Ramazan Bayramı 2
    : [NRV] Ramazan Bayramı 3
    : [NRV] Kurban Bayramı 1
    : [NRV] Kurban Bayramı 2
    : [NRV] Kurban Bayramı 3
    : [NRV] Kurban Bayramı 4
    """

    locale = "tr-TR"

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for fr-CA

I am a French Canadian and we have slightly different holidays to our English compatriots. If it were possible to include that locale in the possible selections, it would be appreciated. I am willing to try and help if I can.

Add locale for pt-PT

The following locale needs to be verfied/completed:

class pt_PT(Locale):
    u"""
    01-01: [NF] Ano Novo
    04-25: [NF] Dia da Liberdade
    05-01: [NF] Dia do Trabalhador
    06-10: [NF] Dia de Portugal
    08-15: [NF] Assunção de Nossa Senhora
    10-05: [NF] Implantação da República
    11-01: [NF] Todos os Santos
    12-01: [NF] Restauração da Independência
    12-08: [NF] Imaculada Conceição
    12-25: [NF] Natal
    : [NRV] Carnaval
    : [NRV] Sexta-feira Santa
    : [NRV] Páscoa
    : [NRV] Corpo de Deus
    """

    locale = "pt-PT"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)

Add locale for ga-IE

The following locale needs to be verified/completed:

class ga_IE(Locale):
    """
    01-01: [NF] Lá Caille or Lá Bliana Nua
    03-17: [NF] Lá Fhéile Pádraig
    12-25: [NRF] Lá Nollag
    12-26: [NRF] Lá Fhéile Stiofáin or Lá an Dreoilín
    : [NRV] Luan Cásca
    : [NV] Lá an Lucht Oibre
    : [NV] Lá Saoire i mí Mheitheamh
    : [NV] Lá Saoire i mí Lúnasa
    : [NV] Lá Saoire i mí Dheireadh Fómhair
    """

    locale = "ga-IE"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Non-regional holidays not marked as national in locale nl-NL

Describe the bug
The following holidays have no regions defined, but do not have flag N (i.e. are national holidays).

  • Which holidays are affected?
    05-04: [F] Dodenherdenking
    12-05: [RF] Sinterklaas
    
  • Which years does the bug affect?
    All years

Expected behavior
If a holiday has no regions defined, it should have flag N.

Add locale for es-MX

Basic information

  • What is the language code according to ISO 639-1?
  • What is the country code according to ISO 3166-2?

(please replace LANG and COUNTRY in the issue title accordingly)

  • Provide a list of all holidays, i.e. days "which are defined by law on which business or work are suspended or reduced"
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...? If yes, which holidays and what is the algorithm?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...? If yes, which holidays and what is the algorithm?
  • If possible, provide the legal sources which define the holidays.

For each holiday

  • What is the official name?
  • Is it a regional or nation-wide holiday?
  • If regional, what are the regions the holiday is observed in? (Note: currently only regions defined in ISO_3166-2 are supported)
  • Is it a fixed or variable date?
  • If fixed, provide the date in format MM-DD
  • If a holiday has a variable date: What is the algorithm to calculate it (e.g. nth <weekday>/<day> in <month>,...? If it depends on the easter date: Is it the western or orthodox easter date?
  • If the holiday is proclaimed by the government: Can you provide the source?

Add locale for es-CO

The following locale needs to be verified/completed:

class es_CO(Locale):
    """
    01-01: [NF] Año Nuevo
    05-01: [NF] Día del Trabajo
    07-20: [NF] Grito de Independencia
    08-07: [NF] Batalla de Boyacá
    12-08: [NRF] Inmaculada Concepción
    12-25: [NRF] Navidad
    : [NV] Día de los Reyes Magos
    : [NRV] Día de San José
    : [NRV] Jueves Santo
    : [NRV] Viernes Santo
    : [NRV] Domingo de Pascua
    : [NRV] La Ascensión del Señor
    : [NRV] Corpus Christi
    : [NRV] El Sagrado Corazón de Jesús
    : [NV] San Pedro y San Pablo
    : [NRV] Asunción de la Virgen
    : [NV] Día de la Raza
    : [NRV] Todos los Santos
    : [NV] Independencia de Cartagena
    """

    locale = "es-CO"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for en-india

Basic information

  • What is the language code according to ISO 639-1?
  • What is the country code according to ISO 3166-2?

(please replace LANG and COUNTRY in the issue title accordingly)

  • Provide a list of all holidays, i.e. days "which are defined by law on which business or work are suspended or reduced"
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...? If yes, which holidays and what is the algorithm?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...? If yes, which holidays and what is the algorithm?
  • If possible, provide the legal sources which define the holidays.

For each holiday

  • What is the official name?
  • Is it a regional or nation-wide holiday?
  • If regional, what are the regions the holiday is observed in? (Note: currently only regions defined in ISO_3166-2 are supported)
  • Is it a fixed or variable date?
  • If fixed, provide the date in format MM-DD
  • If a holiday has a variable date: What is the algorithm to calculate it (e.g. nth <weekday>/<day> in <month>,...? If it depends on the easter date: Is it the western or orthodox easter date?
  • If the holiday is proclaimed by the government: Can you provide the source?

Add locale for en-ZA

The following locale needs to be verified/completed:

class en_ZA(Locale):
    """
    01-01: [NF] New Year's Day
    03-21: [NF] Human Rights Day
    04-27: [NF] Freedom Day
    05-01: [NF] Workers' Day
    06-16: [NF] Youth Day
    08-09: [NF] National Women's Day
    09-24: [NF] Heritage Day
    12-17: [NF] Day of Reconciliation
    12-25: [NF] Christmas Day
    12-26: [NF] Day of Goodwill
    : [NV] Family Day
    2 days before Easter: [NRV] Good Friday
    """

    locale = "en-ZA"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add support for partial holidays

Some countries have partial holidays, holidata should support it.

What "partialities" are there?

  • <end - day is holiday until end, normal workday afterwards (any examples?)
  • start> - day is workday until start, holiday afterwards (e.g. Christmas Eve in Iceland is holiday from 13:00)
  • start - end - holiday only between start and end (never say never, but is that possible...?)

Regional holidays marked as national in locale de-DE

Describe the bug
The following holidays have flag N (i.e. are national holidays) but have regions defined.

  • Which holidays are affected?
    01-06: [BW,BY,ST] [NRF] Heilige drei Könige
    08-15: [SL] [NRF] Mariä Himmelfahrt
    11-01: [BW,BY,NW,RP,SL] [NRF] Allerheiligen
    60 days after Easter: [BW,BY,HE,NW,RP,SL] [NRV] Fronleichnam
    11 days before 4. sunday before 12-25: [SN] [NRV] Buß- und Bettag
    10-31: [*] [NRF] Reformationstag*
    03-08: [BE] [NF] Frauentag
    2020-05-08: [BE] [NF] 75. Jahrestag der Befreiung vom Nationalsozialismus und der Beendigung des Zweiten Weltkrieges in Europa
    
    *Holiday "Reformationstag" is a national holiday only in 2017
  • Which years does the bug affect?
    All years

Expected behavior
If a holiday has regions defined, it should not have flag N.

Add locale for pl-PL

The following locale needs to be verified/completed:

class pl_PL(Locale):
    """
    01-01: [NF] Nowy Rok
    01-06: [NRF] Trzech Króli
    05-01: [NF] Święto Pracy
    05-03: [NF] Święto Konstytucji Trzeciego Maja
    08-15: [NRF] Wniebowzięcie NMP
    11-01: [NRF] Wszystkich Świętych
    11-11: [NF] Święto Niepodległości
    12-25: [NRF] Boże Narodzenie (pierwszy dzień)
    12-26: [NRF] Boże Narodzenie (drugi dzień)
    : [NRV] Wielkanoc
    : [NRV] Poniedziałek Wielkanocny
    : [NRV] Zielone Świątki
    : [NRV] Boże Ciało
    """

    locale = "pl-PL"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)

Add locale for lt-LT

The following locale needs to be verified/completed:

class lt_LT(Locale):
    """
    01-01: [NF] Naujieji metai
    02-16: [NF] Lietuvos valstybės atkūrimo diena
    03-11: [NF] Lietuvos nepriklausomybės atkūrimo diena
    05-01: [NF] Tarptautinė darbo diena
    06-24: [NF] Joninės, Rasos
    07-06: [NF] Valstybės diena
    08-15: [NRF] Žolinė
    11-01: [NRF] Visų šventųjų diena
    12-24: [NRF] Šv. Kalėdos
    12-25: [NRF] Šv. Kalėdos
    12-26: [NRF] Šv. Kalėdos
    : [NRV] Velykos
    : [NRV] Velykos
    """

    locale = "lt-LT"
    easter_type = 

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Error in locale fr-FR

There is a typo in the fr-FR locale (year 2020 and 2021 checked).
Ascension holiday is currently written ascencion (with a "c"). It shoud be written ascension (with an "s")

Meaning of the type flags

What does the different letters of the type indicate? I can't seem to find any information regarding this on holidata.net nor in the repository.

Wrong assignment of flag `N` in locale de-CH

Describe the bug
The following holidays either have flag N (i.e. are national holidays) but have regions defined, or have no regions defined but lack the flag N.

  • Which holidays are affected?
      05-01: [BL,BS,GR,NE,SH,TG,TI,ZH] [NF] Tag der Arbeit
      12-25: [RF] Weihnachtstag
      2 days before Easter: [AG,AI,AR,BE,BL,BS,FR,GE,GL,GR,JU,LU,NE,NW,OW,SG,SH,SO,SZ,TG,UR,VD,ZG,ZH] [NRV] Karfreitag
      1 day after Easter: [AI,AR,BE,BL,BS,GE,GL,GR,JU,SG,SH,SZ,TG,TI,UR,VD,ZH] [NRV] Ostermontag
      39 days after Easter: [RV] Auffahrt
      49 days after Easter: [RV] Pfingstsonntag
    
  • Which years does the bug affect?
    All years

Expected behavior
If a holiday has regions defined, it should not have flag N and vice versa.

Add locale for Turkish-Turkey tr-TR

Basic information for Turkey
Language Code: tr
Country Code: TR

2020

Holidays with fixed dates (All are national except new year and Labor day, however Labor day is still fixed):

Jan 1 - New Year
Apr 23 - National Independence Day
May 1 - Labor Day
May 19 - Ataturk Memorial, Youth and Sports Day
Jul 15 - Democracy Day
Aug 30 - Victory Day
Oct 29 - Republic Day

Holidays with variable dates (mainly because they depend on a different calendar). Each year both holidays move 10 days earlier than previous year, but I'm not sure if that's a fixed value (10 days):

May 24 - May 26 Ramadan Holiday (3 days) - globally known as "Eid ul Fitr"
Jul 31 - Aug 3 Kurban Holiday (4 days) - globally known as "Eid al-Adha"

2021

Fixed dates do not change

Variable dates:
May 13 - May 15 Ramadan Holiday (3 days) - known globally as "Eid ul Fitr"
Jul 19 - Jul 23 Kurban Holiday (4 days) - known globally as "Eid al-Adha"

Official website for 2021 (you can find other years as well): https://www2.diyanet.gov.tr/DinHizmetleriGenelMudurlugu/Sayfalar/2021YılıResmiTatilGünleri.aspx

Add locale for en-IN

The following locale needs to be verified/completed:

class en_IN(Locale):
    """
    01-01: [NF] New Year's Day
    12-25: [NF] Christmas
    : [NV] Lohri
    : [NV] Pongal, Makar Sankranti
    : [NV] Guru Gobind Singh Jayanti
    : [NV] Republic Day
    : [NV] Vasant Panchami
    : [NV] Guru Ravidas Jayanti
    : [NV] Maha Shivaratri
    : [NV] Chhoti Holi, Holika Dahan
    : [NV] Holi
    2 days before Easter: [NV] Good Friday
    Easter: [NV] Easter
    : [NV] Gudi Padwa, Ugadi
    : [NV] Solar New Year, Baisakhi
    : [NV] Rama Navami
    : [NV] Hazarat Ali's Birthday
    : [NV] Buddha Purnima
    : [NV] Eid al-Fitr , Ramadan
    : [NV] Independence Day
    : [NV] Rakhi, Raksha Bandhan
    : [NV] Krishna Janmashtami
    : [NV] Ganesh Chaturthi
    : [NV] Onam, Eid al-Adha, Bakrid
    : [NV] Gandhi Jayanti
    : [NV] Durga Ashtami
    : [NV] Maha Navami
    : [NV] Dussehra, Madhvacharya Jayanti
    : [NV] Muharram
    : [NV] Valmiki Jayanti
    : [NV] Karwa Chauth
    : [NV] Diwali, Lakshmi Puja
    : [NV] Gowardhan Puja
    : [NV] Bhaiya Dooj
    : [NV] Chhath Puja
    : [NV] Guru Nanak Jayanti, Nehru Jayanti
    : [NV] Milad an-Nabi, Id-e-Milad
    """

    locale = "en-IN"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

JsonEmitter returns invalid JSON object

Describe the bug
holidata --year=2020 --locale='de-DE' --output=json returns invalid JSON response. While each individual holiday object is correct, the response as a whole should be wrapped in square brackets, and objects separated by a comma.

Expected behavior
Valid JSON array (as in https://www.json.org/json-en.html) of holiday objects is returned.

Additional context
Fixing this should solve SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 2 column 1 of the JSON data when entering for example https://holidata.net/en-US/2016.json on firefox.

Add locale for be-BY

The following locale needs to be verified:

class be_BY(Locale):
    """
    01-01: [NF] Новы Год
    01-07: [NRF] Раство Хрыстова(праваслаўнае)
    08-03: [NF] Міжнародны жаночы дзень
    05-01: [NF] Свята працы
    05-09: [NF] Дзень Перамогі
    07-03: [NF] Дзень незалежнаці
    11-07: [NF] Дзень Кастрычніцкай рэвалюцыі
    12-25: [NRF] Раство Хрыстова(у заходніх хрысціян)
    Easter: [NRV] Пасха(праваслаўная)
    15 days after Easter: [NRV] Радуніца
    """

    locale = "be-BY"
    easter_type = EASTER_ORTHODOX

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for sv-SE

The following locale needs to be verified/completed:

class sv_SE(Locale):
    """
    01-01: [NF] Nyårsdagen
    01-06: [NRF] Trettondedag jul
    04-30: [NF] Valborgmässoafton
    05-01: [NF] Första maj
    06-06: [NF] Nationaldagen
    12-24: [NRF] Julafton
    12-25: [NRF] Juldagen
    12-26: [NRF] Annandag jul
    12-31: [NF] Nyårsafton
    : [NRV] Långfredagen
    : [NRV] Påskdagen
    : [NRV] Annandag påsk
    : [NRV] Kristi Himmelsfärdsdag
    : [NRV] Pingstdagen
    : [NV] Midsommarafton
    : [NV] Midsommardagen
    : [NV] Alla Helgons Dag
    """

    locale = "sv-SE"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for ja-JP

The following locale needs to be verified/completed:

class ja_JP(Locale):
    """
    01-01: [NF] 元日
    02-11: [NF] 建国記念の日
    04-29: [NF] 昭和の日
    05-03: [NF] 憲法記念日
    05-04: [NF] みどりの日
    05-05: [NF] こどもの日
    11-03: [NF] 文化の日
    11-23: [NF] 勤労感謝の日
    12-23: [NF] 天皇誕生日
    : [NV] 成人の日
    : [NV] 春分の日
    : [NV] 海の日
    : [NV] 敬老の日
    : [NV] 秋分の日
    : [NV] 体育の日
    """

    locale = "jp-JP"

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Make project python only

Currently, this repository contains two mechanisms for generating holidata files - the Python approach (in the python subdirectory) and the old approach (everything else). As the idea was to have the Python definition files take over, should we just restructure this repo to be a simple Python package, removing all the legacy code?

@lauft @pbeckingham

Add locale for nb-SJ

The following locale needs to be verified/completed:

class nb_SJ(Locale):
    """
    01-01: [NF] Nyttårsdag
    05-01: [NF] Offentlig Høytidsdag
    05-08: [NF] Frigjøringsdag 1945
    05-17: [NF] Grunnlovsdag
    12-24: [NRF] Julaften
    12-25: [NRF] Juledag
    12-26: [NRF] Juledag
    12-31: [NF] Nyttårsaften
    : [NRV] Fastelavn
    : [NRV] Palmesøndag
    : [NRV] Skjærtorsdag
    : [NRV] Langfredag
    : [NRV] Påskedag
    : [NRV] Påskedag
    : [NRV] Kristi Himmelfartsdag
    : [NRV] Pinsedag
    : [NRV] Pinsedag
    """

    locale = "nb-SJ"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for cs-CZ

The following locale needs to be verified:

class cs_CZ(Locale):
    u"""
    01-01: [NF] Nový rok
    01-01: [NF] Den obnovy samostatnosti českého státu
    05-01: [NF] Svátek práce
    05-08: [NF] Den vítězství
    07-05: [NRF] Den slovanských věrozvěstů
    07-06: [NRF] Den upálení mistra Jana Husa
    09-28: [NRF] Den české státnosti
    10-28: [NF] Den vzniku samostatného československého státu
    11-17: [NF] Den boje za svobodu a demokracii
    12-24: [NRF] Štědrý den
    12-25: [NRF] 1. svátek vánoční
    12-26: [NRF] 2. svátek vánoční
    1 day after Easter: [NRV] Velikonoční pondělí
    """

    locale = "cs-CZ"
    easter_type = 

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)

Add locale for es-AR

We need the holiday locale for Argentina.
You can find the goverment issued list of holidays and non-labourable days here.
I can happily provide a script for scrap and convert to any format you need.

Add locale for lv-LV

The following locale needs to be verified/completed:

class lv_LV(Locale):
    """
    01-01: [NF] Jaunais Gads
    05-01: [NF] Darba svētki
    05-05: [NF] Latvijas Republikas Neatkarības atjaunošanas dienu
    06-24: [NF] Jāņi
    11-18: [NF] Latvijas Republikas proklamēšanas diena
    12-24: [NRF] Ziemassvētku vakars
    12-25: [NRF] Ziemassvētki
    12-26: [NRF] 2. Ziemassvētki
    12-31: [NF] Vecgada vakars
    : [NRV] Lielā Piektdiena
    : [NRV] Lieldienas
    : [NRV] 2. Lieldienas
    """

    locale = "lv-LV"
    easter_type = 

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for sl-SI

https://en.wikipedia.org/wiki/Public_holidays_in_Slovenia
https://www.gov.si/en/topics/national-holidays/ official government link

List of fixed nationwide work free holidays:

  • 01-01 "New Year's Day"
  • 01-02 "New Year's Day"
  • 02-08 "Prešeren Day"
  • 04-27 "Day of Uprising Against Occupation"
  • 05-01 "Labour Day"
  • 05-02 "Labour Day"
  • 06-25 "Statehood Day"
  • 08-15 "Feast of the Assumption"
  • 10-31 "Reformation Day"
  • 11-01 "Day of Remembrance for the Dead"
  • 12-25 "Christmas Day"
  • 12-26 "Independence and Unity Day"

List of moving holidays:

Add locale for is-IS

The following locale needs to be verified/completed:

class is_IS(Locale):
    u"""
    01-01: [NF] Nýársdagur
    05-01: [NF] Verkalýðsdagurinn
    06-17: [NF] Lýðveldisdagurinn
    12-24: [NRF] Jól
    12-25: [NRF] Jól
    12-26: [NRF] Jól
    12-31: [NF] Gamlárskvöld
    : [NRV] Skírdagur
    : [NRV] Föstudaginn langi
    : [NRV] Páskadagur
    : [NRV] Annar í páskum
    : [NV] Sumardagurinn fyrsti
    : [NRV] Uppstigningardagur
    : [NRV] Annar í hvítasunnu
    : [NV] Frídagur verslunarmanna
    """

    locale = "is-IS"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)

Add locale for es-MX

The following locale needs to be verified/completed:

class es_MX(Locale):
    """
    01-01: [NF] Año Nuevo
    05-01: [NF] Día del Trabajo
    09-16: [NF] Día de la Independencia
    12-12: [NRF] Nuestra Señora de Guadalupe
    12-25: [NRF] Navidad
    : [NV] Día de la Constitución
    : [NV] Natalicio de Benito Juárez
    : [NRV] Jueves Santo
    : [NRV] Viernes Santo
    : [NV] Día de la Revolución
    """

    locale = "es-MX"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for et-EE

The following locale needs to be verified/completed:

class et_EE(Locale):
    """
    01-01: [NF] uusaasta
    02-24: [NF] iseseisvuspäev
    05-01: [NF] kevadpüha
    06-23: [NF] võidupüha
    06-24: [NF] jaanipäev
    08-20: [NF] taasiseseisvumispäev
    12-24: [NF] jõululaupäev
    12-25: [NF] esimene jõulupüha
    12-26: [NF] teine jõulupüha
    : [NRV] suur reede
    : [NRV] ülestõusmispühade 1. püha
    : [NRV] nelipühade 1. püha
    """

    locale = "et-EE"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for et-EE

Hi! I live in the beautiful Estonia and started using Timewarrior. It'd be great to have holiday data for this country.

Add locale for en-HK

The following locale needs to be verified/completed:

class en_HK(Locale):
    """
    01-01: [NF] The first day of January
    05-01: [NF] Labour Day
    07-01: [NF] Hong Kong Special Administrative Region Establishment Day
    10-01: [NF] National Day
    12-25: [NRF] Christmas Day
    12-26: [NRF] The first weekday after Christmas Day
    : [NV] Lunar New Year’s Day
    : [NV] The second day of Lunar New Year
    : [NV] The third day of Lunar New Year
    2 days before Easter: [NRV] Good Friday
    : [NV] The day following Good Friday
    : [NRV] Ching Ming Festival
    : [NV] The Birthday of the Buddha
    : [NV] Tuen Ng Festival
    : [NV] The day following the Chinese Mid-Autumn Festival
    : [NV] Chung Yeung Festival
    """

    locale = "en-HK"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Support location in addition to ISO 3166-2 codes as region

In Spain we have national and regional holidays that can be covered by ISO 3166-2:ES codes but also 2 days of local holidays. And by local I mean holidays different by location not province. i.e. a Granada, Málaga or Seville holiday is not for the whole province but just for the city.

I think we must use ISO 3166 codes for regions that are covered but for smaller divisions accept the complete localized name of the location. Holidays by regions smaller and/or not in ISO 3266 codes could be the case in other countries. At least it is for Spain.

region meaning
AN for Andalusia autonomous community ISO 3166-2:ES
GR for Granada province ISO 3166-2:ES
MA for Málaga province ISO 3166-2:ES
SE for Seville province ISO 3166-2:ES
Granada for Granada city (proposed)
Málaga for Málaga city (proposed)
Sevilla for Seville city (proposed)

But I don't know if the region parameter can handle safely UTF-8 and spaces present in some location's name.

Add locale for en-GL

The following locale needs to be verified/completed:

class en_GL(Locale):
    """
    01-01: [NF] New Year's Day
    01-06: [NF] Epiphany
    06-21: [NF] Ullortuneq
    12-24: [NRF] Christmas Eve
    12-25: [NRF] Christmas Day
    12-26: [NRF] St Stephen's Day
    12-31: [NF] New Year's Eve
    3 days before Easter: [NRV] Maundy Thursday
    2 days before Easter: [NRV] Good Friday
    1 day after Easter: [NRV] Easter Monday
    : [NRV] General Prayer Day
    39 days after Easter: [NRV] Ascension
    50 days after Easter: [NRV] Whit Monday
    """

    locale = "en-GL"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct? Can you maybe provide a translation?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Add locale for en-CA

The following locale needs to be verified/completed:

class en_CA(Locale):
    """
    01-01: [NF] New Year's Day
    07-01: [NF] Canada Day
    11-11: [NF] Remembrance Day
    12-25: [NRF] Christmas Day
    12-26: [NF] Boxing Day
    : [NV] Family Day
    2 days before Easter: [NRV] Good Friday
    1 day after Easter: [NRV] Easter Monday
    : [NV] Victoria Day
    1. monday in august: [NV] First Monday of August
    : [NV] Labour Day
    : [NV] Thanksgiving Day
    """

    locale = "en-CA"
    easter_type = EASTER_WESTERN

Checklist:

  • Are all holidays (i.e. days "which are defined by law on which business or work are suspended or reduced") listed? Can you provide the legal sources which define the holidays?
  • Is the spelling correct?
  • Are the fixed dates <month>-<day> correct?
  • If a holiday has a variable date: Is the algorithm to calculate it correct/can you provide it if missing? If it depends on the easter date: Is it the western or orthodox easter date?
  • If a holiday is proclaimed by the government: Can you provide the source?
  • Are holidays moved to a different date, e.g. if they fall on a saturday/sunday/...?
  • Are holidays observed on a different date (is there a substitute holiday), e.g. if they fall on a saturday/sunday/...?
  • Are the flags correct? (N = national holiday, defined by law, R = holiday with religious background, F = holiday with fixed date, V = holiday with variable date)
  • Have there been any holidays renamed/deleted/created since 2011? If yes, which ones and since when?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.