Skip to content

_add_holiday* method documentation #1665

Answered by arkid15r
maxrausch asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @maxrausch,
you're absolutely right -- there is no documentation for these methods. You can blame me for that. I implemented those methods as a part of syntactic sugar improvements for PH needs. You can still use the "old fashioned" way for adding holidays directly, e.g. entity[dt] = "My Holiday". Here you can find the implementation with my comments. Essentially the code supports 4 different cases (from most to least frequently used):

  • <month> <day> patterns (e.g., _add_holiday_jun_15()).
  • <last/nth> <weekday> of <month> patterns (e.g., _add_holiday_last_mon_of_aug() or _add_holiday_3rd_fri_of_aug()).
  • <n> day(s) <past/prior> <last/<nth> <weekday> of <month> patterns (e.g., _add_holiday…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@maxrausch
Comment options

Answer selected by maxrausch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants