Package lib :: Module holiday
[hide private]
[frames] | no frames]

Module holiday

source code

holiday support routines

Classes [hide private]
  Holiday
class holding a Holiday object (date is not stored, use HolidayProvider for that)
  HolidayProvider
class holding the holidays throught the year(s)
Functions [hide private]
datetime.date
_get_orthodox_easter(year)
compute date of orthodox easter
source code
datetime.date
_get_catholic_easter(year)
compute date of catholic easter
source code
[str,...]
_strip_empty(sl)
strip empty strings from list sl
source code
str
_flatten(sl)
join list sl into a comma-separated string
source code
(int,int,int)
_decode_date_str(ddef)
decode a date definition string into a (year,month,day) tuple
source code
Variables [hide private]
  __package__ = 'lib'
Function Details [hide private]

_decode_date_str(ddef)

source code 

decode a date definition string into a (year,month,day) tuple

Parameters:
  • ddef - date definition string of length 2, 4 or 8

    If ddef is of the form "DD" then tuple (0,0,DD) is returned, which stands for any year - any month - day DD.

    If ddef is of the form "MMDD" then tuple (0,MM,DD) is returned, which stands for any year - month MM - day DD.

    If ddef is of the form "YYYYMMDD" then tuple (YYYY,MM,DD) is returned, which stands for year YYYY - month MM - day DD.

Returns: (int,int,int)