jurajmajer / enrico

Enrico Service provides holiday dates for several countries.
MIT License
44 stars 22 forks source link

Add public holidays in Turkey #21

Closed ccprog closed 4 years ago

ccprog commented 4 years ago

For information besides the turkish law cited, see also https://en.wikipedia.org/wiki/Public_holidays_in_Turkey.

All public holidays start on 13:00 of the previous day. I have not entered that as additional PART_DAY_HOLIDAY, because it is also true for the weekend: as defined by law 2429, it also starts on Saturday 13:00.

The one provision I am not sure I got right is: Holidays ending on Friday are prolonged to include Saturday. Please review.

jurajmajer commented 4 years ago

Hi,

thank you very much for your work. I have amended your definition of Turkish holidays a little bit. I think dates of Eid al-Fitr and Eid al-Adha were not correct. Take a look. I have also some questions regarding Turkish holidays which are not clear to me.

  1. What happens if holiday falls on Saturday or Sunday? Is the holiday transferred to next working day (Monday)? Because you defined it this way in tur.xml. Element observanceRule transfers holiday to Monday. But this site https://tr.usembassy.gov/holiday-calendar/ says Victory Day was celebrated on Sunday, August 30 2020. So no tranfer to Monday happened.
  2. You wrote: "All public holidays start on 13:00 of the previous day." Is this really true for all public holidays? This site https://tr.usembassy.gov/holiday-calendar/ says it happens only for Eid al-Fitr, Eid al-Adha and Republic Day.
  3. Are dates of demoted holidays in tur.xml correct? Constitution Day should be 27 May and National Day should be 24 July. Correct?

Thank you once again.

ccprog commented 4 years ago

Yes, there are still some errors. I shouldn't have worked on this so late in the evening.

Regarding the religious Holidays:

So on reading my commit again, it seems I mixed up the months, but your correction doesn't fit the law, either.

I am working from law 2429 itself. I have provided you with an inofficial english translation in this gist

Articles 1-2 define several sorts of holidays:

No further provisions are made for holidays begining on the previous evening.

Article 2 D) says:

National holidays and official holidays specified in this Law: When the holiday ends on a Friday evening, the following Saturday is a whole holiday.

No provisions are made for holidays on a Sunday.

Article 3 A) says:

Weekend is on Sunday. This holiday starts from 13.00 on Saturday at the latest, and lasts no less than 35 hours.

There is a further amendment I have missed on the first pass that made December 31 1999 a full day public holiday.

Regarding the demoted hjolidays, you are right.

jurajmajer commented 4 years ago

Thank you very much for your support! I have amended the Turkish holidays. If you spot any issues just let me know.

ccprog commented 4 years ago

Now the half-day for Republic Day is still missing.

jurajmajer commented 4 years ago

No, it is there. There are 3 half-days: Eid al-Fitr, Eid al-Adha and Republic Day. Here are calculated holidays for 2020 according to our tur.xml: https://holidays.kayaposoft.com/public_holidays.php?country=tur&year=2020

ccprog commented 4 years ago

Sorry, missed it reading in the file, but I can already see it in my Linux Mint calendar dev.