Skip to content

Commit

Permalink
Add weeks to instant check
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauko Quiroga committed Mar 11, 2021
1 parent 8f580d4 commit c557909
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openfisca_core/periods.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def offset(self, offset, unit):
Instant((2014, 12, 31))
"""
year, month, day = self
assert unit in (DAY, MONTH, YEAR), 'Invalid unit: {} of type {}'.format(unit, type(unit))
assert unit in (WEEKDAY, WEEK, DAY, MONTH, YEAR), 'Invalid unit: {} of type {}'.format(unit, type(unit))
if offset == 'first-of':
if unit == MONTH:
day = 1
Expand Down

0 comments on commit c557909

Please sign in to comment.