Ad
  • Custom User Avatar

    What is the expected result if dob is a leap day?

  • Custom User Avatar

    Ruby: 2200-05-16 is considered not yet born, but it is before 2200-06-15 and so should've been born.

  • Custom User Avatar

    C++ has an error in tests:

    In file included from main.cpp:7:
    ./tests.cpp:133:7: error: use of undeclared identifier 'leapYear'
      if (leapYear(year) && month == 2 && year != 0) { return 29; }
          ^
    1 error generated.
    

    Also sample tests are wrong. They assume a current date of 2200-01-01.

  • Custom User Avatar

    Trying C++ and having a concern: if I was born in "2002-01-01" and the date (const TIME) is "2200-06-15", then my next birthday should be on "2201-01-01" ???

  • Custom User Avatar

    Use the real amount of days for every month, as well as considering leap years.

    Why do people think that performing calculations on abstract "dynamic" values is a good idea? Different months and years have different amounts of days - could you explain how am I supposed to tell the number of months and years since/until some date? What would be the result for 2199-10-03 (which is exactly 90 days before 2200-01-01)? "1 month and 60 days"? "1 month and 59 days"? "2 months and 29 days"? Something else?