Ad
  • Custom User Avatar

    Needs random tests

  • Custom User Avatar

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

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

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

  • Custom User Avatar

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

  • Default User Avatar

    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 of FullDate 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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    thank you for your kind words!

  • Default User Avatar

    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.

  • Default User Avatar

    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.

  • Default User Avatar

    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.