Menu

#5 There's no such thing as human readable negative time

open
nobody
None
5
2006-11-09
2006-11-09
Dan
No

Consider:

$a = new CDate_Span(1, 2);
$b = new CDate_Span(2, 1);

print $a->toSeconds(); //1
print $b->toSeconds(); //-1

the length of A and B is 1; it's the same duration.

so $a->equals($b); // is true.

but the actual result is:
false

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.