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.
added random tests
tried to add some more clarity, and fixed the issue where the epoch start isn't the first of the month.
happy for suggestions on how to clarify the problem more as i dont think its there yet
Author solution does not count individual days for months and quarters. It'll happily say
get_epoch('2019-01-31','m','2019-02-01') === 1
when it's a 1-day period.Requirement is under-specified. Do we round up, round down, or round to nearest for weeks, months and quarters? How to count months and quarters?
Needs Random Tests
Sample tests
performance hit as no need to sort the numbers that arent the bottom two?