Beta

Return TIMESTAMP from date

Description
Loading description...
Fundamentals
Date Time
Regular Expressions
  • Please sign in or sign up to leave a comment.
  • arxlunea Avatar

    This comment has been hidden.

  • xdrizztx Avatar

    Instructions mention it should return "Invalid date" but the tests are testing for "Invalid date!" (in those cases)

  • Voile Avatar

    Tests are still quite weak and doesn't test the requirement strictly.

    Also, where are the random tests?

  • wthit56 Avatar

    Interesting kata. Maybe it could be streamlined in a more straightforward "write a dateFromString function".

    Description needs more work

    • Year does not have to be 4 digits.
    • When a date is invalid, it should return "Invalid date!"
    • You should say what the general format is: dd[spaces][-.][spaces]mm[spaces][-.][spaces]yy[yy] (obviously put better than that, but these thing should be defined.

    Tests should be added:

    • You never test for the "." delimiter.
  • drogimex Avatar

    Thanks for comments, i corrected description.

  • docgunthrop Avatar

    The kata description should be cleaned up. The first line says:

    Input: date in format dd-mm-yyy

    but it also says:

    Day: one or two digits

    Month: one or two digits

    Year: four digits