Commit a229cc70 authored by Vincent Pelletier's avatar Vincent Pelletier

More date rounding fixes.

Similar to cb29ab44 .
parent 0ae2ae8d
......@@ -709,10 +709,10 @@ def _asWeekString(timestamp):
def _weekStringAsQuarterString(timestamp):
year, month, _ = timestamp.split('/')
return '%s/%02i' % (year, int(month) / 3 * 3 + 1)
return '%s/%02i' % (year, (int(month) - 1) / 3 * 3 + 1)
def _roundWeek(dt):
return dt.replace(day=dt.day / 7 * 7 + 1)
return dt.replace(day=(dt.day / 7 - 1) * 7 + 1)
def _asDayString(timestamp):
dt, _ = timestamp.split(' ')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment