Comments (4)
@sturmer, @h0adp0re the locale et-EE
is now available on holidata.net. 🥳
from holidata.
Hi!
Adding a locale requires a list of all public holidays, i.e. days "which are defined by law on which business or work are suspended or reduced". To get this started, please provide the online sources of the legal documents which define the holidays.
If you want to help:
-
Gather a list of all public holidays, i.e. days "which are defined by law on which business or work are suspended or reduced" from the source.
-
Now for each holiday:
- Has it a fixed or variable date?
- What is the official name (as written in the legal source/calendar)?
- 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)
- If the holiday date is variable, what is the algorithm to calculate the date? This could be something like "X days before/after easter", "nth (week)day of month", ...
- Is the holiday observed on a different date or is there a substitute holiday if it falls on a saturday/sunday/...
-
Since holidata provides data since 2011 it would be helpful to know whether a holiday has been renamed/deleted/created since 2011
If you want to contribute a PR:
Create a file et-EE.py
in holidata/holidays
, enter the new locale et-EE
in the list of locales in the __init__.py
in the same directory.
Within et-EE.py
create a class and the following skeleton:
# coding=utf-8
from dateutil.easter import EASTER_WESTERN
from .holidays import Locale
class et_EE(Locale):
"""
"""
locale = "et-EE"
easter_type = EASTER_WESTERN
For each holiday with a fixed date add a line in the following format within the class doc (between the triple-quotes):
- for regional holidays
MM-DD: [<regions>] [<flags>] <name>
- for nation-wide holidays:
MM-DD: [<flags>] <name>
The relevant flags here are F
for fixed date and N
for national (all regions) and R
for religious (e.g. christmas, church holidays). The [<regions>]
has to be omitted if it is a nation-wide holiday.
For each holiday holiday with a variable date:
- If it depends on the easter date, add a line in the following format within the class doc:
n days (before|after) Easter: [<regions>] [<flags>] <name>
(for Easter,Easter: ...
suffices) - If the holiday is held on a specific weekday, add a line in the following format:
nth. (last)? <weekday> in <month>: [<regions>] [<flags>] <name>
e.g.1. monday in august
or2. last saturday in may
Also here the [<regions>]
has to be omitted if it is a nation-wide holiday.
If a holiday has a variable date that cannot be covered by the patterns above, add a function holiday_<holiday_name_in_snake_case>
to the class. The function must return a List[Holiday]
. See the other locales for examples. Such a function is required e.g. if
- a holiday is proclaimed by the government
- a holiday is moved to a different date, if they fall on a saturday/sunday/...?
- a holiday is observed on a different date or there is a substitute holiday when they fall on a saturday/sunday/...
- a holiday has been renamed/deleted/created since/after 2011
from holidata.
Hello, I can help a little in this regard. I don't think I have time to contribute code but here's our law with all our public holidays and other important dates: https://www.riigiteataja.ee/en/eli/ee/525062018003/consolide/current
from holidata.
@h0adp0re I have added PR #81 for this. Could you take a look and help to resolve the open questions there?
from holidata.
Related Issues (20)
- Holidata.net domain expired? HOT 1
- Holidata.net seams down HOT 1
- Error in locale en-US, year 2024: Day after Thanksgiving HOT 1
- Add locale for es-PE HOT 1
- JsonEmitter returns invalid JSON object HOT 3
- Add locale for sl-SI HOT 1
- Add locale for en-AU HOT 2
- Error in locale fr-FR HOT 2
- Add locale for es-MX
- Add locale for en-india HOT 1
- Add locale for sl-SI HOT 4
- Add locale for en-ZA HOT 1
- Add support for locale en-AU HOT 1
- Error in locale en-GB, year 2022 HOT 1
- [Question] Module not installable from pypi? HOT 1
- Update legal sources for Turkish holidays HOT 1
- Locales for Scotland & Northern ireland HOT 1
- Removal of Columbus Day as an US Holiday
- Add locale for Hi-In (Hindi - India )
- Add locale for en-SG
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from holidata.