MDL-66147 core: add get_time_interval_string()
authorJake Dallimore <jake@moodle.com>
Tue, 6 Aug 2019 08:27:26 +0000 (16:27 +0800)
committerJake Dallimore <jake@moodle.com>
Mon, 12 Aug 2019 01:35:51 +0000 (09:35 +0800)
commit612b210d7692e46a821f6ac18d87ecba96ef2b51
tree53020089db1b61480f6a181a3f9db401ae62ddcb
parentdb381d5c87ffa57fb39d9e9c1b11e98e73150087
MDL-66147 core: add get_time_interval_string()

Returns a formatted string representation of the difference between two
timestamps, defaulting to 'Xd Xh Xm' format, but supporting custom
format strings containing any chars from:
https://www.php.net/manual/en/dateinterval.format.php.
lang/en/moodle.php
lib/moodlelib.php
lib/tests/moodlelib_test.php