Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ocflib/printing/quota.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def daily_quota(day=None):
if day is None:
day = datetime.today()

if HAPPY_HOUR_START <= day and day < HAPPY_HOUR_END:
if HAPPY_HOUR_START <= day and day <= HAPPY_HOUR_END:
return HAPPY_HOUR_QUOTA
elif day.weekday() in {5, 6}:
return WEEKEND_QUOTA
Expand Down
2 changes: 1 addition & 1 deletion tests/printing/quota_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
# Test "happy hour" quotas
('2017-12-01', WEEKDAY_QUOTA),
('2019-5-6', HAPPY_HOUR_QUOTA),
('2019-5-16', HAPPY_HOUR_QUOTA),
('2019-5-17', HAPPY_HOUR_QUOTA),
('2017-12-23', WEEKEND_QUOTA),
])
def test_daily_quota(time, expected):
Expand Down