Skip to content

Commit

Permalink
Merge branch 'wip-MDL-60742-master' of git://github.com/marinaglancy/…
Browse files Browse the repository at this point in the history
…moodle
  • Loading branch information
David Monllao committed Jan 9, 2018
2 parents 1679485 + 099bca6 commit 51673a3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions calendar/lib.php
Expand Up @@ -1819,6 +1819,13 @@ function calendar_time_representation($time) {
$timeformat = get_config(null, 'calendar_site_timeformat');
}

// Allow language customization of selected time format.
if ($timeformat === CALENDAR_TF_12) {
$timeformat = get_string('strftimetime12', 'langconfig');
} else if ($timeformat === CALENDAR_TF_24) {
$timeformat = get_string('strftimetime24', 'langconfig');
}

return userdate($time, empty($timeformat) ? $langtimeformat : $timeformat);
}

Expand Down
2 changes: 2 additions & 0 deletions lang/en/langconfig.php
Expand Up @@ -48,6 +48,8 @@
$string['strftimerecent'] = '%d %b, %H:%M';
$string['strftimerecentfull'] = '%a, %d %b %Y, %I:%M %p';
$string['strftimetime'] = '%I:%M %p';
$string['strftimetime12'] = '%I:%M %p';
$string['strftimetime24'] = '%H:%M';
$string['thisdirection'] = 'ltr';
$string['thisdirectionvertical'] = 'btt';
$string['thislanguage'] = 'English';
Expand Down

0 comments on commit 51673a3

Please sign in to comment.