Comments (7)
Is there a special handling for such a case?
There is no special handling when 2 holidays coincide. The rule of the longest applies. Even if they are right back to back then again both will be holidays. So, it will be longest possible :)
I checked the PR, looks good to me. Nice job.
from holidata.
Sure just keep in touch.
Normally, they know future 5-6 years of religious holidays in advance but they refrain to announce up until 2-3 years. The reason being the unstable cycles of the moon.
from holidata.
@farukara thanks for adding this. I have drafted a locale from the data you provided, which we can flesh out:
class tr_TR(Locale):
"""
01-01: [NF] Yılbaşı # New Year
04-23: [NF] Ulusal Egemenlik ve Çocuk Bayramı # National Independence Day
05-01: [NF] Emek ve Dayanışma Günü # Labor Day
05-19: [NF] Atatürk'ü Anma Gençlik ve Spor Bayramı # Ataturk Memorial, Youth and Sports Day
07-15: [NF] DEMOKRASİ VE MİLLİ BİRLİK GÜNÜ # Democracy Day
08-30: [NF] Zafer Bayramı # Victory Day
10-29: [NF] Cumhuriyet Bayramı # Republic Day
: [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"
Here are my open issues:
- I only found the all caps version of
DEMOKRASİ VE MİLLİ BİRLİK GÜNÜ
on the website you mentioned. Can you provide a capitalized version? - What do you mean by "All are national except new year and Labor day, however Labor day is still fixed"? Is new year/labour day a regional holiday? If yes, which regions?
- Concerning the religious holidays: Can we safely assume that if we know one of those dates we can calculate all the others, i.e. their relative distance does not change? If so we can implement a basic algorithm that shifts by 10 days from the previous year if not set otherwise.
- Can you provide the URLs for the holidays for the years 2011 to 2020? (This is especially important for reconstructing the variable holiday dates). I did not find a direct link to the previous years on the page you mentioned above and navigating the website with Google Translate is a tad cumbersome...
- Currently holidata does not support partial holidays, so we have to decide whether we drop
RAMADAN HOLIDAY AREFES
(May 12) andFeast of Sacrifice
(July 19) or include them as whole days.
from holidata.
Looks like almost ready to ship to me. Nice work. Here are some answers to your questions:
-
The capitalized version:
Demokrasi ve Milli Birlik Günü
-
First, I meant new year and labor day are observed internationally, so you can't really say it's a national holiday, they are almost a global holiday I guess. I think, I initially misunderstand your national/regional labels. I thought of region as comprised of a couple of countries like Eastern Europe. But I guess you're referring to regions inside the country. If that's the case all holidays are national. Turkey don't have smaller regions with their own holidays. If I'm still getting it wrong please let me know. Second by saying "labor day is still fixed" I meant it's always 1st of May, no matter which day of the week it happens. I know in some other countries it's always sundays of some week, however that's not the case for Turkey. So that should be easy.
-
Religious holidays are based on lunar calendar and it's pretty lunatic if you ever had to worked with it. That's why I'm really not sure if you can extract a mathematical rule out of it. You would be pretty famous I should say if you can. I guess best bet would be to set the variable holidays manually each year. To make the matter worse, the difference is not always 10 days each year, it really randomly changes between 9-12 days or so. I told you, you would pull your hair if you want to implement an algorithm. I found a python module however, which deals with that calendar but I haven't had a chance to give it a try yet. Here is the module if you want to check out yourself.
-
You can easily see previous years by changing the year in the URL. But it only goes back to 2014. Here is another link which is a little bit easier to digest. Notice Democracy Day, the holiday we mentioned in the first item, is started to be observed on 2017 and later.
-
I'm not a fan of half day holidays. That's why I didn't even mentioned that at my first message. Furthermore, most of the time it's only half day off for government jobs, not the private sector. So I would suggest skip them altogether. If that's the route you want to take, then you can ignore
Arefe
days for both religious holidays.
Hope that helps. If you still have questions let me know. Cheers.
from holidata.
First, I meant new year and labor day are observed internationally...
Your assumptions are correct. Holidata treats each country individually, so there are no international holidays. Regions are those defined by ISO_3166-2.
Religious holidays are based on lunar calendar and it's pretty lunatic...
That fact was already clear to me. My question was wether at least the relative distance between Ramazan Bayramı
and Kurban Bayramı
is fixed. If this is the case, we only need to define a single reference date per year which would simplify the procedure.
... Here is another link which is a little bit easier to digest. ...
The suggested PDF does not contain Democracy Day
... 😳
... So I would suggest skip them altogether...
Agreed. The half-holidays are dropped for now
If I researched it correctly (https://www.takvim.com/2011_takvimi.html - no official source, I guess...), in 2011 Zafer Bayramı
and Ramazan Bayramı (1. Gün)
fell on the same day, 2011-08-30
. Is there a special handling for such a case?
from holidata.
I have compiled everything so far into a PR to review: #61
from holidata.
PR is merged and holidata.net provides the new locale tr-TR. Thanks @farukara for your contribution.
It would be nice if I can count on you to keep an eye on further developments of the locale. Do you know when the new dates for the religious holidays are announced?
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
- Error in locale de-DE 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 HOT 1
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.