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.
Needs random tests
Kata translated into both Ruby and Python, if you want to approve them :)
I would also add more example test cases and some random test, so let me know if I might help in that regard :)
Thanks mypitit, now I understand what you meant.
I took the liberty to fix the initial solution as well with month-1, and added your first case in the Example Test Cases.
Hi Balkoth,
My mistake, I got the array for month wrong, just fixed the code and the test cases as well, sorry for that.
The day of the week is right though, it was 12th August 1926 which was a Thursday.
Well, the 12th September 1926 was a Sunday, while the 12th October 1926 was a Tuesday.
When I see
Test.assertSimilar(FullDate(12, 8, 1926), "Thursday 12th September 1926")
I assume that the 8 is supposed to be September. But the day of week is wrong.This needs clarification from the author :)
Actually was a Tuesday, I fear you kept the month as "8".
I already wrote the author in private about naming conventions, using a good [].join("") instead of adding up lots of strings and so on to be improved :)
This needs more test cases, you only test dates with a day number in the form 'th'.
Also, you should say that the
month
parameter ofFullDate
is 0-based.Last point, I think there's an error in your solution: the 12th September 1926 was a Sunday and not a Thursday.
In this case I made it so that two objects with the same values in different order are considered the same. I will add that to the description for clarity.
thank you for your kind words!
Very good one! Data comparison is always trick in JS.
One thing I'm doubting about considering the question, would two objects with the same values in different order be considered the same? As a data structure they are but it would be good for the function to have a sorting function to make certain that the comparison is proper.
I like the creativity of the Kata! It's not the normal thing certainly but as a person who loves music I find this very inspiring.
Really like this Kata!
Have you thought adding the data values for the different tip percentages as a hint at the start of the function? Would help people build a proper data structure and see the problem more clearly.