Note: I didn't realize there was a JS version before I totally updated the tests+examples in the description and the thing is... the python version used an incorrect date.... X( (that I kept as base... :/ )
=> I just updated the JS version so that it's consistent with the new version of the description (removing/updating the incorrrect fixed tests), just so that both languages have the same behavior... But I invalidated all previous JS solutions, so... Anyway, it needs a full rewrite...
one small typo: habbit should be habit
done for python. JS needs an update. Closing here.
description updated. Now it's easy to spot.
issue part: JS version needs to be completely rewritten to be consistent with the python one
There are no random tests, only fixed tests.
And all but a few of the tests expects false.
Need to clarify what 100-day window every 1500 days is. Is it a 1500 or 1600 day interval? Where is that window along the whole interval?
100-day window every 1500 days
Random tests added to python.
JS is still lacking, though...
The 1st sample test case says 2048-07-01 should return True, but the closest date range is 2048-07-18 - 2048-10-25.
According to my calculations 2048-07-01 is 40483 days away from 1937-8-30.
2048-07-18 - 2048-10-25
Definitely not naughty, but a NICE and relatively simple way to learn how to access objects within objects!
This comment is hidden because it contains spoiler information about the solution
You're right, my calculations were off. Thanks for letting me know. I have updated the kata and test cases accordingly.