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 6 years ago.
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 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?
You must be logged in to reply to this topic.
Comments are closed.
If you find our tools useful, please consider making a donation to help us stay online and building software!