Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
C translation 📆 (author gone)
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/175.
Please join the discussion to help us identify duplicate kata and retire them.
Yes, now it works! Thanks!!
I've replaced the reference solution with my code. Please, reset the trainer, and check whether it works fine now.
Hi, I get the same issue as almost everyone below - the expected number of Fridays is sometimes one lower.
I revealed the previous solutions because I could not get my head around it and
I'm getting the same issue even when copy pasting one of already approved solutions.
Is this kata buggy?
Some test are not working, for example, I got: Not the correct number of Fridays between 2014 and 2015 - Expected: 3, instead got: 4.
But actually there are 4 and not 3:
2014-01-31T00:00:00.000Z
2014-02-28T00:00:00.000Z
2014-10-31T00:00:00.000Z
2015-07-31T00:00:00.000Z
This comment is hidden because it contains spoiler information about the solution
Some of the random test don't work, for instance:
returns 7 when between 1969 and 1972
Not the correct number of Fridays between 1969 and 1972 - Expected: 7, instead got: 8
I counted the end of month Fridays in such years and there are 8!!
*** Fix for this bug ***
In the Kata Test Cases, inside the function lastDayIsFridayCheck(), there's the following three lines:
.setMonth() expects a zero-based integer (ie. 0 for January)
The following will fix the problem:
Loading more items...