Test Failure – Expected :right now Actual :moments from now

Splash Forums PrettyTime Users Test Failure – Expected :right now Actual :moments from now

This topic contains 4 replies, has 4 voices, and was last updated by  adashrod 9 years, 7 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #18211



    I would like to thank you all for developing this really useful library. However I have spent the best part of a couple of hours trying to figure this problem out:

    When i run the rests (copied from the support page) I get a number ComparisonFailure’s.

    Expected :30 years ago

    Actual :3 decades ago

    Also when using the prettyTime.format(new Date(0)) it seems to give me the complete wrong reference. Could anyone please help / point out what i’m doing wrong?

    Using maven & the latest version.



    Hey! Have you tried the 1.0.8-SNAPSHOT version from the OCPsoft repository?


    Do you still get the failures there?




    Just tested it on 1.8.0.Final, still happening –

    Log.e(“ELADKATZ”, “Time:”+p.format(new Date(System.currentTimeMillis())));

    prints out 05-07 18:52:36.870: E/ELADKATZ(30596): Time:moments from now


    Hmm. That’s bad. Could you please attach a JUnit test case that reproduces this so that I can debug? You can use one of the existing tests as an example: https://github.com/ocpsoft/prettytime





    Is there any update on comparing two times that are equal?

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘PrettyTime Users’ is closed to new topics and replies.

Comments are closed.