Package logilab-common-0 :: Package 39 :: Package 0 :: Module date
[frames] | no frames]

Module date

source code

Date manipulation helper functions.

:copyright: 2006-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

Functions
 
get_national_holidays(begin, end)
return french national days off between begin and end
source code
 
add_days_worked(start, days)
adds date but try to only take days worked into account
source code
 
nb_open_days(start, end) source code
 
date_range(begin, end, step=STEP)
enumerate dates between begin and end dates.
source code
Variables
  STEP = timedelta(days= 1)
  endOfMonth = RelativeDateTime(months= 1, day=-1)
  FRENCH_FIXED_HOLIDAYS = {'jour_an': '%s-01-01', 'fete_travail'...
  FRENCH_MOBILE_HOLIDAYS = {'paques2004': '2004-04-12', 'ascensi...
Function Details

date_range(begin, end, step=STEP)

source code 

enumerate dates between begin and end dates.

step can either be oneDay, oneHour, oneMinute, oneSecond, oneWeek
use endOfMonth to enumerate months


Variables Details

FRENCH_FIXED_HOLIDAYS

Value:
{'jour_an': '%s-01-01', 'fete_travail': '%s-05-01', 'armistice1945': '\
%s-05-08', 'fete_nat': '%s-07-14', 'assomption': '%s-08-15', 'toussain\
t': '%s-11-01', 'armistice1918': '%s-11-11', 'noel': '%s-12-25',}

FRENCH_MOBILE_HOLIDAYS

Value:
{'paques2004': '2004-04-12', 'ascension2004': '2004-05-20', 'pentecote\
2004': '2004-05-31', 'paques2005': '2005-03-28', 'ascension2005': '200\
5-05-05', 'pentecote2005': '2005-05-16', 'paques2006': '2006-04-17', '\
ascension2006': '2006-05-25', 'pentecote2006': '2006-06-05', 'paques20\
07': '2007-04-09', 'ascension2007': '2007-05-17', 'pentecote2007': '20\
07-05-28', 'paques2008': '2008-03-24', 'ascension2008': '2008-05-01', \
'pentecote2008': '2008-05-12',}