Ad
  • Default User Avatar

    Who has this problem don't belive Google about seconds and pay attention to this:

    For the purpose of this Kata, a year is 365 days and a day is 24 hours.

  • Default User Avatar

    Chrono79. I think you may be wrong

    4 years and 68 days in seconds is this

    ( ( 86400 * 365 ) * 4 ) + ( 86400 * 68 ) =
    132019200

    That number is bigger than the input (127246240)

    132019200 - 127246240 =
    4772960

    Using an online tool, https://www.calculatorsoup.com/calculators/conversions/time.php

    gives seconds to years as 4.03. If it was 68 days, it would be more like 4.186

    68 / 365 =
    .18630136986301369863

    Can you go back and check please ?

  • Custom User Avatar

    I can agree...really struggled on this one. But curious how other did it

  • Custom User Avatar

    The tests are fine. Not a kata issue. It's 68 days btw, read the error message again and print the input to debug your code.

  • Custom User Avatar

    I get this error:
    basicTests
    expected:<4 years, 6[8 days, 3 hours and 4 minute]s> but was:<4 years, 6[3 days, 11 hours, 57 minutes and 20 second]s>

    random tests are correct.

    In my IDE I cant reproduce the behavior. Everything seems fine. Even If choose the input 127246240 (which is 4 years, 8 days, 3 hours and 4 minutes) the output is correct. Any idea? Done with Java