Add months and years to Timestamp::getHumanTimestamp()
authorJuliusz Gonera <jgonera@wikimedia.org>
Thu, 3 Jan 2013 20:57:59 +0000 (12:57 -0800)
committerJuliusz Gonera <jgonera@wikimedia.org>
Thu, 3 Jan 2013 20:57:59 +0000 (12:57 -0800)
commit424dcde4fe136cf916bb3c5a7a46724e9d9a9300
tree34384aee413d7d1b6c4a7c11922b449cf1337294
parent0b20dcd535ad02b6d458a7e39ee1427c98f2ea7c
Add months and years to Timestamp::getHumanTimestamp()

Now if the difference between $now and $then is >= 30 days, "X months
ago" or "X years ago" is returned.

Month is defined as 30 days, but it shouldn't cause problems  in this
case. The "X time ago" messages are approximate anyway.

Change-Id: I228a11e23783484b64c29db94c3607a415fa81a8
includes/Timestamp.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc
tests/phpunit/includes/TimestampTest.php