Skip to content

Commit

Permalink
Fix when we show next month meeting
Browse files Browse the repository at this point in the history
If the current month meeting has started 1h ago or more (and not is
going to start in less that one hour), it is over, and we wnat to move
to the next month.
  • Loading branch information
smortex committed Jan 14, 2025
1 parent 61a2787 commit 1d3260e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contributing/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dayOffset = 2 - nextMeeting.day();
if (dayOffset < 0) dayOffset += 7;
nextMeeting.add(dayOffset, 'days');

if (nextMeeting.isBefore(moment.tz(eventTimeZone).add(1, 'hour'))) {
if (nextMeeting.isBefore(moment.tz(eventTimeZone).subtract(1, 'hour'))) {
nextMeeting = moment.tz(eventTimeZone).startOf('month').add(1, 'month').add(1, 'week').hours(16).minutes(30);
dayOffset = 2 - nextMeeting.day();
if (dayOffset < 0) dayOffset += 7;
Expand Down

0 comments on commit 1d3260e

Please sign in to comment.