Skip to content

Commit

Permalink
fix broken ui.getMonthPlus
Browse files Browse the repository at this point in the history
  • Loading branch information
ilius committed Jan 19, 2024
1 parent 7891947 commit 97eeb3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scal3/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

from scal3 import cal_types, core, event_lib, locale_man
from scal3.cal_types import calTypes, jd_to
from scal3.date_utils import monthPlus as lowMonthPlus
from scal3.event_update_queue import EventUpdateQueue
from scal3.json_utils import (
loadJsonConf,
Expand Down Expand Up @@ -663,7 +664,7 @@ def jdPlus(plus: int = 1) -> None:


def getMonthPlus(tmpCell: CellType, plus: int) -> CellType:
year, month = core.monthPlus(tmpCell.year, tmpCell.month, plus)
year, month = lowMonthPlus(tmpCell.year, tmpCell.month, plus)
day = min(tmpCell.day, cal_types.getMonthLen(year, month, calTypes.primary))
return cellCache.getCellByDate(year, month, day)

Expand Down

0 comments on commit 97eeb3b

Please sign in to comment.