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

Class Holiday

source code

object --+
         |
        Holiday

class holding a Holiday object (date is not stored, use HolidayProvider for that)


Note: Rendering style is determined considering flags in this order:

  1. OFF
  2. MULTI

First flag that matches determines the style.

Instance Methods [hide private]
 
__init__(self, header=[], footer=[], flags_str=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
merge_with(self, hol_list)
merge a list of holiday objects into this object
source code
str
header(self)
return a comma-separated string for header_list
source code
str
footer(self)
return a comma-separated string for footer_list
source code
str
__str__(self)
string representation for debugging purposes
source code
int
_parse_flags(self, fstr)
return a bit combination of flags, from a comma-separated string list
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]
  OFF = 1
  MULTI = 2
  REMINDER = 4
Instance Variables [hide private]
  flags
bit combination of {OFF=1, MULTI=2, REMINDER=4}
  footer_list
string list for footer (secondary text)
  header_list
string list for header (primary text)
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, header=[], footer=[], flags_str=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

string representation for debugging purposes

Returns: str
Overrides: object.__str__

Instance Variable Details [hide private]

flags

bit combination of {OFF=1, MULTI=2, REMINDER=4}

OFF: day off (real holiday)

MULTI: multi-day event (used to mark long day ranges, not necessarily holidays)

REMINDER: do not mark the day as holiday