Ad
  • Custom User Avatar

    Hi,

    • the specs are not matching the tests: 'S' should return None while it's supposed to be taken as 's'.
    • This has nothing to do with a date parser, this is a time converter.
    • why returning None when the value is negative? A negative timedelta makes sense.
    • The task as very little interest, and the DateParser class and its methods are totally useless => ?

    Cheers

  • Custom User Avatar

    What is DateParser, and why is it preloaded? Users do not have to implement it, so why is it tested?

  • Custom User Avatar
    • Code style issue: variable names should really be better than aaa, bbb, and ccc. Please assign some meaningful names to the variables. first and second are also not very fortunate names, maybe something like from/to or source/target would be better?
    • UX/test style issue: failed tests should use failure messages to present inputs which cased failure. You can see example kata or Python authoring guide for examples.
  • Custom User Avatar

    No Random Tests

  • Custom User Avatar
    • The "Parser" name does not really make sense. I imagine "parsing" as transformation form a textual form, and this is not what really happens here.
    • Returning -1 for negative inputs does not seem to be the most fortunate design. If negative values are invalid input, then this should be signalled in a way appropriate for each language (throwing an exception of an appropriate type, raising an error, returning Error type). But why would the negative values be wrong at all? I imagine they would make sense if interpreted as "time in the past", or something.