MDL-66552 core: move and rename relativedatestimediffformat string

AMOS BEGIN
    MOV [relativedatestimediffformat,moodle],[dateintervaldayshoursmins,langconfig]
AMOS END
This commit is contained in:
Jake Dallimore 2019-09-02 10:54:16 +08:00
parent 310d6901f9
commit b9679e69ec
3 changed files with 2 additions and 2 deletions

View File

@ -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';

View File

@ -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';

View File

@ -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);
}