logilab-common #18966 weird behaviour of lgc.date.nb_open_days() [validation pending]

# I comment here since I cannot create tickets.

# The bug: # logilab.common.date.nb_open_days() is broken

# How to reproduce:

from datetime import datetime
from logilab.common.date import nb_open_days

date = datetime(2009, 11, 22, 0, 0, 0, 0) # Sunday
print nb_open_days(date, date) # -1

date1 = datetime(2009, 11, 29, 0, 0, 0, 0) # Sunday
date2 = datetime(2009, 11, 30, 0, 0, 0, 0) # Sunday + 1
print nb_open_days(date1, date2) # -1

date1 = datetime(2009, 12, 31, 0, 0, 0, 0) # not a working day
date2 = datetime(2010, 1, 1, 0, 0, 0, 0) # happy new year and not a working day
print nb_open_days(date1, date2) # 1
prioritynormal
typebug
done in0.54.0
load0.000
load left0.000
closed by<not specified>