Skip to content

Commit 9aa6e8b

Browse files
author
David Monllao
committed
Merge branch 'wip-MDL-60742-34' of git://github.com/marinaglancy/moodle into MOODLE_34_STABLE
2 parents 068f22a + a66195b commit 9aa6e8b

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

calendar/lib.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,6 +1805,13 @@ function calendar_time_representation($time) {
18051805
$timeformat = get_config(null, 'calendar_site_timeformat');
18061806
}
18071807

1808+
// Allow language customization of selected time format.
1809+
if ($timeformat === CALENDAR_TF_12) {
1810+
$timeformat = get_string('strftimetime12', 'langconfig');
1811+
} else if ($timeformat === CALENDAR_TF_24) {
1812+
$timeformat = get_string('strftimetime24', 'langconfig');
1813+
}
1814+
18081815
return userdate($time, empty($timeformat) ? $langtimeformat : $timeformat);
18091816
}
18101817

lang/en/langconfig.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
$string['strftimerecent'] = '%d %b, %H:%M';
4949
$string['strftimerecentfull'] = '%a, %d %b %Y, %I:%M %p';
5050
$string['strftimetime'] = '%I:%M %p';
51+
$string['strftimetime12'] = '%I:%M %p';
52+
$string['strftimetime24'] = '%H:%M';
5153
$string['thisdirection'] = 'ltr';
5254
$string['thisdirectionvertical'] = 'btt';
5355
$string['thislanguage'] = 'English';

0 commit comments

Comments
 (0)