Ad
  • Custom User Avatar

    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).

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Yes, it still works.

    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 [...]

    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-input

    Your code is incorrect, not a kata issue.

  • Custom User Avatar

    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.