D29373: Taiwan: Hardcoding holidays based on the Lunar Calendar; Minor update to the holiday list

2020-05-06 Thread Weisi Dai
weisi abandoned this revision.
weisi added a comment.


  Closing this revision. Let's get D29223  
in.

REPOSITORY
  R175 KHolidays

REVISION DETAIL
  https://phabricator.kde.org/D29373

To: weisi, winterz, cgiboudeaux
Cc: nhiga, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29373: Taiwan: Hardcoding holidays based on the Lunar Calendar; Minor update to the holiday list

2020-05-03 Thread Weisi Dai
weisi added a comment.


  I agree with the general idea in D29223  
and feel D29223  is in a better shape than 
this diff. However, I think some festivals referred to in this diff (not 
mentioned in the law -  紀念日及節日實施辦法 
 - but are still 
special days of interest that many people celebrate) can be adapted into D29223 
.

REPOSITORY
  R175 KHolidays

REVISION DETAIL
  https://phabricator.kde.org/D29373

To: weisi, winterz, cgiboudeaux
Cc: nhiga, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29373: Taiwan: Hardcoding holidays based on the Lunar Calendar; Minor update to the holiday list

2020-05-03 Thread N. Higa
nhiga added a comment.


  > specified the start year of Peace Memorial Day 228和平紀念日
  
  Great! This is what I have missed in my patch.
  
  > The star * ones are specified using the "lunar new year date" minus/plus 
some days, hoping to make it easier to adapt to additional years in the future.
  
  I appreciate this new idea and I think it is worth discussing which way of 
dealing lunar calendar-based holidays is better.
  I consider my method a no-brainer because:
  
  - In many cases, Lunar calendar-based (public) holidays in Taiwan are 
actually the same as (or similar to) those in Hong Kong, so basically we can 
refer to the dates in `holiday_hk_en-gb` (which contains the dates up to 2030). 
One notable exception is the Mid-Autumn Festival - for Hong Kong the holiday is 
on the day **after** Mid-Autumn Festival.
  - Or, just refer to the document published by the Ministry of the Interior, 
R. O. C. (Taiwan), which is really straightforward.
  
  For your method:
  
  - We can see the patterns for those holidays (i.e. Lunar new year date + XX 
days + extra months or days (leap month 閏月 / leap days 閏日))
  - If you are (very) familiar with lunar calendar, this method may actually be 
better. Otherwise, you will have to be really careful with the leap months/days.
  
  > There are holidays entries regarding specific arrangements (an extra day is 
observed in lieu of an extra working day) that can't be calculated in advance
  
  If you are referring to 補假 (substitute holiday / supplementary holiday), the 
logic is stated in the law (紀念日及節日實施辦法 
):
  
  > 
紀念日及節日之放假日逢例假日應予補假。例假日為星期六者於前一個上班日補假,為星期日者於次一個上班日補假。但農曆除夕及春節放假日逢例假日,均於次一個上班日補假。
  
  I believe that means:
  
  - If a public holiday is on Saturday, the substitute holiday will be the 
previous working day;
  - If a public holiday is on Sunday, the substitute holiday will be the next 
working day;
  - However, for Lunar New Year's eve and Lunar New Year, the substitute 
holiday will always be the previous working day.
  
  > I think there are still issues with the 4 season dates
  
  I have not enabled "Astronomical Events" plugin, but the astronomical seasons 
(especially June solstice, which is not a holiday for Japan and Hong Kong) are 
still automatically displayed for me. And apparently kholidays has the 
astronomical seasons support already in `src/astroseasons.cpp`.
  Some other issues:
  
  - Official holiday names should be used.
  - Using a third-party and non-official site such as `publicholidays.tw` as 
reference seems unreliable. My patch refers to the law and official documents 
to ensure accuracy.
  - Hence, I excluded all non-official holidays, such as Easter, which has been 
included in your patch.
  - But I cannot say I am 100% sure that I have not missed any official 
**commemorative** days. For example, Wikipedia says the Freedom of Expression 
Day (言論自由日) is an official one, but I wonder why it is not included in the law 
紀念日及節日實施辦法. The website I linked above should be displaying the latest (and 
official) revision of the law. I hope someone from Taiwan can provide more 
information on this.

REPOSITORY
  R175 KHolidays

REVISION DETAIL
  https://phabricator.kde.org/D29373

To: weisi, winterz, cgiboudeaux
Cc: nhiga, kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29373: Taiwan: Hardcoding holidays based on the Lunar Calendar; Minor update to the holiday list

2020-05-03 Thread N. Higa
nhiga added a reviewer: cgiboudeaux.

REPOSITORY
  R175 KHolidays

REVISION DETAIL
  https://phabricator.kde.org/D29373

To: weisi, winterz, cgiboudeaux
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29373: Taiwan: Hardcoding holidays based on the Lunar Calendar; Minor update to the holiday list

2020-05-02 Thread Weisi Dai
weisi updated this revision to Diff 81772.
weisi added a comment.


  Renamed "農曆除夕" (//Lunar New Year's eve on Lunar calendar//) to "除夕" (//Lunar 
New Year's eve//). There's no need to specify "lunar calendar" here.

REPOSITORY
  R175 KHolidays

CHANGES SINCE LAST UPDATE
  https://phabricator.kde.org/D29373?vs=81770=81772

REVISION DETAIL
  https://phabricator.kde.org/D29373

AFFECTED FILES
  holidays/plan2/holiday_tw_zh

To: weisi, winterz
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns


D29373: Taiwan: Hardcoding holidays based on the Lunar Calendar; Minor update to the holiday list

2020-05-02 Thread Weisi Dai
weisi created this revision.
weisi added a reviewer: winterz.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
weisi requested review of this revision.

REVISION SUMMARY
  The previous revision put in fixed dates (month/day) for many holidays which 
are actually based on the Lunar calendar, instead of the Georgian calendar. 
They are not observed on a fixed date each year.
  
  As a workaround, I put in the dates for the holidays over years 2020 to 2024:
  
  - Chinese New Year's Eve 除夕 *
  - Spring Festival 春節 *
  - Lantern Festival 元宵節 *
  - Matsu's Birthday 媽祖聖誕 *#
  - Buddha's Birthday 佛誕日 *#
  - Chinese Valentine's Day 七夕節 *
  - Double Ninth Day 重陽節 *
  - Dragon Boat Festival 端午節
  - Mid-Autumn Festival 中秋節
  
  The //star *// ones are specified using the "lunar new year date" minus/plus 
some days, hoping to make it easier to adapt to additional years in the future.
  
  There are holidays entries regarding specific arrangements (an extra day is 
observed in lieu of an extra working day) that can't be calculated in advance - 
usually they published early that year. I removed these from future years since 
the arrangement has not been published and I don't want to include holiday 
entries that are too speculative.
  
  I also removed a few religious holidays from the holidays list, simply 
because I think they are not on a fixed date of each Georgian year. 2 of these 
are converted to the format above, as marked with the # sign.
  
  I also specified the start year of Peace Memorial Day 228和平紀念日, and added 
Freedom of Expression Day 言論自由日.
  
  I think there are still issues with the 4 season dates (March Equinox 春分, Jun 
Solstice 夏至, September Equinox 秋分, December Solstice 冬至) but maybe there's some 
better solution for this.

REPOSITORY
  R175 KHolidays

REVISION DETAIL
  https://phabricator.kde.org/D29373

AFFECTED FILES
  holidays/plan2/holiday_tw_zh

To: weisi, winterz
Cc: kde-frameworks-devel, LeGast00n, cblack, michaelh, ngraham, bruns