Skip to content

Commit

Permalink
oh whoops flipped
Browse files Browse the repository at this point in the history
  • Loading branch information
NoobInDaHause committed Mar 6, 2024
1 parent 31e138d commit 1edec90
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions redbot/core/commands/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ def parse_timedelta(
if params.get("years"): # convert years to days
years = params.pop("years")
params.setdefault("days", 0)
params["days"] += 30 * years
params["days"] += 365 * years
if params.get("months"): # convert months to days
months = params.pop("months")
params.setdefault("days", 0)
params["days"] += 365 * months
params["days"] += 30 * months
try:
delta = timedelta(**params)
except OverflowError:
Expand Down Expand Up @@ -206,11 +206,11 @@ def parse_relativedelta(
if params.get("years"): # convert years to days
years = params.pop("years")
params.setdefault("days", 0)
params["days"] += 30 * years
params["days"] += 365 * years
if params.get("months"): # convert months to days
months = params.pop("months")
params.setdefault("days", 0)
params["days"] += 365 * months
params["days"] += 30 * months
try:
delta = relativedelta(**params)
except OverflowError:
Expand Down

0 comments on commit 1edec90

Please sign in to comment.