Skip to content

Commit

Permalink
Merge 0d4452c into 56d2cbd
Browse files Browse the repository at this point in the history
  • Loading branch information
xjezda00 committed Aug 9, 2016
2 parents 56d2cbd + 0d4452c commit 5ae83cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions did/base.py
Expand Up @@ -302,10 +302,10 @@ def period(argument):
else:
if "last" in argument:
since, until = Date.last_week()
period = "the last week"
period = "the last week # " + since.datetime.strftime("%V")
else:
since, until = Date.this_week()
period = "this week"
period = "this week # " + since.datetime.strftime("%V")
return since, until, period


Expand Down
4 changes: 2 additions & 2 deletions tests/test_base.py
Expand Up @@ -64,13 +64,13 @@ def test_Date_period():
since, until, period = Date.period(argument)
assert unicode(since) == "2015-09-28"
assert unicode(until) == "2015-10-05"
assert period == "this week"
assert period == "this week # " + since.datetime.strftime("%V")
# Last week
for argument in ["last", "last week"]:
since, until, period = Date.period(argument)
assert unicode(since) == "2015-09-21"
assert unicode(until) == "2015-09-28"
assert period == "the last week"
assert period == "the last week # " + since.datetime.strftime("%V")
# This month
for argument in ["month", "this month"]:
since, until, period = Date.period(argument)
Expand Down

0 comments on commit 5ae83cd

Please sign in to comment.