diff --git a/lang/en/langconfig.php b/lang/en/langconfig.php index 331cf1f84c2..f597c33a613 100644 --- a/lang/en/langconfig.php +++ b/lang/en/langconfig.php @@ -24,6 +24,7 @@ $string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z'; $string['backupnameformat'] = '%Y%m%d-%H%M'; +$string['dateintervaldayshoursmins'] = '%ad %hh %im'; // See https://www.php.net/manual/en/dateinterval.format.php for format. $string['decsep'] = '.'; $string['firstdayofweek'] = '1'; $string['iso6391'] = 'en'; diff --git a/lang/en/moodle.php b/lang/en/moodle.php index b0cef088529..69c45226462 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -1639,7 +1639,6 @@ $string['rejectdots'] = 'Reject...'; $string['relativedatesmode'] = 'Relative dates mode'; $string['relativedatesmode_help'] = 'Display course or activity dates relative to the user\'s start date in the course.<br />The user\'s course start date will be their enrolment start date, unless they are enrolled before the course begins in which case their start date will be the course start date.<br/><strong>WARNING: This is an experimental feature and not all activities may support it. Once the course has been created, this course setting can no longer be changed.</strong>'; $string['relativedatesmode_warning'] = '<strong>Warning:</strong> Relative dates mode cannot be changed once the course has been created.'; -$string['relativedatestimediffformat'] = '%ad %hh %im'; $string['reload'] = 'Reload'; $string['remoteappuser'] = 'Remote {$a} User'; $string['remove'] = 'Remove'; diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 88855b9f9a8..8a650b1a378 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2393,7 +2393,7 @@ function get_time_interval_string(int $time1, int $time2, string $format = ''): $dtdate2 = new DateTime(); $dtdate2->setTimeStamp($time2); $interval = $dtdate2->diff($dtdate); - $format = empty($format) ? get_string('relativedatestimediffformat', 'moodle') : $format; + $format = empty($format) ? get_string('dateintervaldayshoursmins', 'langconfig') : $format; return $interval->format($format); }