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.
This isn't really a 7 Kyu (It's harder), it's an optimisation problem. So you have to think of a way to cut down on processing (amount of times you loop).
This comment is hidden because it contains spoiler information about the solution
Yes, it still works.
That's not what is happening. Both sample tests and "attempt" tests work with the same input format. What you're seeing is simply a date represented as a string in the format
YYYY-MM-DD
. You can confirm this yourself by printing the input. See: https://docs.codewars.com/training/troubleshooting/#print-inputYour code is incorrect, not a kata issue.
Does the javascript version still work? It's looking like in the sample tests it's passing the dates as year, month, day and then for the "attempt" it's testing year-month-day which I tried testing just to see what it does, and it's basically an invalid input for dates in JS. If I copy over the tests and change the formatting with commas into the "sample tests" it works.