Skip to content

Commit

Permalink
workaround: add one extra week to account for offset on non-Monday we…
Browse files Browse the repository at this point in the history
…ekly
  • Loading branch information
tokland committed Jan 14, 2025
1 parent 0a79460 commit c489946
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ else if ( DateUnitType.WEEKLY == dateUnitType || DateUnitType.WEEKLY_WEDNESDAY =
WeeklyAbstractPeriodType periodType = (WeeklyAbstractPeriodType) PeriodType
.getByNameIgnoreCase( dateUnitType.getName() );

if ( periodType == null || week < 1 || week > calendar.weeksInYear( year ) )
if ( periodType == null || week < 1 || week > calendar.weeksInYear( year ) + 1 )
{
return null;
}
Expand Down

0 comments on commit c489946

Please sign in to comment.