From 36ebe5d84fdfedcb0d227b44632907883d9c58c4 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 30c6c47..9f45f6b 100644 --- a/form.php +++ b/form.php @@ -464,9 +464,9 @@ public function render_timeline_view($data): string { 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')) . '