Skip to content

Commit

Permalink
meetup exercise: off-by-one error (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
glennj committed Sep 19, 2024
1 parent 4ecd10d commit 13e6aac
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 96 deletions.
2 changes: 1 addition & 1 deletion exercises/practice/meetup/.meta/example.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ meetup = ({year, month, week, dayofweek}) ->
loop
d = date.getDate()
if date.getDay() == dayofweek and d >= week
return Date.UTC date.getFullYear(), date.getMonth() + 1, d
return new Date date.getFullYear(), date.getMonth(), d
date.setDate d + 1

module.exports = {Weeks, Weekdays, meetup}
Loading

0 comments on commit 13e6aac

Please sign in to comment.