Skip to content

Commit

Permalink
Merge pull request #130 from stat-kwon/master
Browse files Browse the repository at this point in the history
Add integer type in timediff options
  • Loading branch information
stat-kwon authored Dec 18, 2024
2 parents bf29ce5 + 138c518 commit 34c8867
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ def _change_datetime_format(results: list) -> list:

def _change_date_by_timediff(self, date: str) -> str:
dt = self._get_datetime_from_str(date)
years = self.timediff.get("years", 0)
months = self.timediff.get("months", 0)
years = int(self.timediff.get("years", 0))
months = int(self.timediff.get("months", 0))

if years:
dt = dt - relativedelta(years=years)
Expand Down

0 comments on commit 34c8867

Please sign in to comment.