Nager.Date icon indicating copy to clipboard operation
Nager.Date copied to clipboard

Add Hong Kong Public Holidays

Open Reena93 opened this issue 6 years ago • 6 comments

Important specifications

  • Which country is affected?
  • If you have found a mistake please also provide a valid source of your information?

For more information, see the CONTRIBUTING guide.

Description

[Description of the bug or feature]

Reena93 avatar Jun 25 '19 08:06 Reena93

Hong Kong is having lots of public holidays. Please add it, It will be very hepful

http://www.1823.gov.hk/common/ical/en.json

Reena93 avatar Jun 25 '19 08:06 Reena93

I can do this if no one else is working on it @tinohager

mkumar341 avatar Jul 13 '19 10:07 mkumar341

@mkumar341 You are cordially invited to contribute here

tinohager avatar Jul 13 '19 21:07 tinohager

There is one challenge here, how to deal with Statutory holidays? Statutory holidays are only to blue collar jobs or agreement of employment and it is called "Off-in-Lieu"; according to it, if holiday is already rest day(i.e: Sunday) then employer is committed to give off-in-lieu on following day. For example: if Buddha birthday is Sunday then Employer give Monday as holiday to employee.

I was thinking to make it like this:

        //Statutory  holiday if on rest day
                if (buddhaBirthday.DayOfWeek == DayOfWeek.Sunday)
                    items.Add(new PublicHoliday(buddhaBirthday.AddDays(1), "佛誕", "Buddha's Birthday (Off-in-Lieu)", countryCode));
                else
                    items.Add(new PublicHoliday(buddhaBirthday, "佛誕", "Buddha's Birthday", countryCode));

Just addition of "Off-in-Lieu"

Let me know you advise on it.

mkumar341 avatar Jul 16 '19 09:07 mkumar341

Hi @tinohager , Did you get chance to check it. Waiting for you advise to proceed on this. Thanks :)

mkumar341 avatar Jul 28 '19 11:07 mkumar341

@mkumar341 Check the Shift method of DateTimeExtension

tinohager avatar Jul 28 '19 13:07 tinohager