From: Thomas Schüttler Date: Wed, 28 Sep 2016 12:57:17 +0000 (+0200) Subject: CRM-19424 - Weekday names if week does not start on Sunday X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=41ff54d3ae15e2f76530ca26f2295b3a162d8ecd;p=civicrm-core.git CRM-19424 - Weekday names if week does not start on Sunday ---------------------------------------- * CRM-19424: Weekday names if week does not start on Sunday https://issues.civicrm.org/jira/browse/CRM-19424 --- diff --git a/CRM/Utils/Date.php b/CRM/Utils/Date.php index c9fc8b0ecd..f04e3a0481 100644 --- a/CRM/Utils/Date.php +++ b/CRM/Utils/Date.php @@ -184,7 +184,7 @@ class CRM_Utils_Date { // set LC_TIME and build the arrays from locale-provided names // June 1st, 1970 was a Monday CRM_Core_I18n::setLcTime(); - for ($i = $firstDay; count($days) < 7; $i = $i > 6 ? 0 : $i + 1) { + for ($i = $firstDay; count($days) < 7; $i = $i > 5 ? 0 : $i + 1) { $days[$i] = strftime('%a', mktime(0, 0, 0, 6, $i, 1970)); } } @@ -213,7 +213,7 @@ class CRM_Utils_Date { // set LC_TIME and build the arrays from locale-provided names // June 1st, 1970 was a Monday CRM_Core_I18n::setLcTime(); - for ($i = $firstDay; count($days) < 7; $i = $i > 6 ? 0 : $i + 1) { + for ($i = $firstDay; count($days) < 7; $i = $i > 5 ? 0 : $i + 1) { $days[$i] = strftime('%A', mktime(0, 0, 0, 6, $i, 1970)); } }