Add 'avoidhours' option to Language#formatTimePeriod
authorJack Phoenix <ashley@uncyclomedia.co>
Sat, 4 May 2019 09:27:04 +0000 (12:27 +0300)
committerJack Phoenix <ashley@uncyclomedia.co>
Fri, 10 May 2019 08:06:00 +0000 (11:06 +0300)
commitb704c9f4de840f17a5e6222a82f56e2436e3eef8
treed92abb36f007e59d09ba912ace56d5fa78f6de38
parent23e254ca11e97bb0e9f1e182238983b854b65107
Add 'avoidhours' option to Language#formatTimePeriod

Example use case: in some skins we want to show how many *days* ago a page was edited, but we don't really care about the precise _hours_.
Thus we'll set [ 'avoid' => 'avoidhours' ] when calling Language#formatTimePeriod to output something like "Page last edited 60 days ago" instead of "Page last edited 60 days 9 hours ago".

Change-Id: I0a737aab14ccb2b8d4eccdc41e1eb9232eedcb8a
RELEASE-NOTES-1.34
languages/Language.php
tests/phpunit/languages/LanguageTest.php