From 6ca251399e906f85edbf3f46ad6f3b1afd7fac22 Mon Sep 17 00:00:00 2001 From: Juan Pablo de Castro Date: Thu, 27 Oct 2022 18:29:14 +0200 Subject: [PATCH] Render the dates using current locale. The previous implementation renders the date as "mm/dd/yy" but many languages prefer the standard format "dd/mm/yy". Moreover, this is easier to read as a header of a timeline or a table. --- form.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/form.php b/form.php index aa6a258..617c978 100644 --- a/form.php +++ b/form.php @@ -424,9 +424,9 @@ public function render_timeline_view($data) { if ($days < ($config->timelinemax * 365)) { // Timeline day span visibility. $output .= ''; for ($d = 0; $d <= $days; $d++) { // Create timeline vertical header. - $date = usergetdate($first["time"] + ($d * (60 * 60 * 24))); + $date = $first["time"] + ($d * (60 * 60 * 24)); $output .= ''; } $output .= '';
' . - $date['mon'] . '/' . $date['mday'] . '/' . $date['year'] . + userdate($date, get_string('strftimedatefullshort', 'langconfig')) . '