MDL-52978 core_lib: fixed wrong days showing for dates in datepicker

This commit is contained in:
Grigory Baleevskiy
2016-03-18 12:31:14 +08:00
committed by Mark Nelson
parent fba7a51461
commit b08fc23a6c
+19 -19
View File
@@ -82,25 +82,25 @@ function form_init_date_js() {
$function = 'M.form.dateselector.init_date_selectors';
$config = array(array(
'firstdayofweek' => $calendar->get_starting_weekday(),
'mon' => date_format_string(strtotime("Monday"), '%a', 99),
'tue' => date_format_string(strtotime("Tuesday"), '%a', 99),
'wed' => date_format_string(strtotime("Wednesday"), '%a', 99),
'thu' => date_format_string(strtotime("Thursday"), '%a', 99),
'fri' => date_format_string(strtotime("Friday"), '%a', 99),
'sat' => date_format_string(strtotime("Saturday"), '%a', 99),
'sun' => date_format_string(strtotime("Sunday"), '%a', 99),
'january' => date_format_string(strtotime("January 1"), '%B', 99),
'february' => date_format_string(strtotime("February 1"), '%B', 99),
'march' => date_format_string(strtotime("March 1"), '%B', 99),
'april' => date_format_string(strtotime("April 1"), '%B', 99),
'may' => date_format_string(strtotime("May 1"), '%B', 99),
'june' => date_format_string(strtotime("June 1"), '%B', 99),
'july' => date_format_string(strtotime("July 1"), '%B', 99),
'august' => date_format_string(strtotime("August 1"), '%B', 99),
'september' => date_format_string(strtotime("September 1"), '%B', 99),
'october' => date_format_string(strtotime("October 1"), '%B', 99),
'november' => date_format_string(strtotime("November 1"), '%B', 99),
'december' => date_format_string(strtotime("December 1"), '%B', 99)
'mon' => strftime('%a', strtotime("Monday")),
'tue' => strftime('%a', strtotime("Tuesday")),
'wed' => strftime('%a', strtotime("Wednesday")),
'thu' => strftime('%a', strtotime("Thursday")),
'fri' => strftime('%a', strtotime("Friday")),
'sat' => strftime('%a', strtotime("Saturday")),
'sun' => strftime('%a', strtotime("Sunday")),
'january' => strftime('%B', strtotime("January 1")),
'february' => strftime('%B', strtotime("February 1")),
'march' => strftime('%B', strtotime("March 1")),
'april' => strftime('%B', strtotime("April 1")),
'may' => strftime('%B', strtotime("May 1")),
'june' => strftime('%B', strtotime("June 1")),
'july' => strftime('%B', strtotime("July 1")),
'august' => strftime('%B', strtotime("August 1")),
'september' => strftime('%B', strtotime("September 1")),
'october' => strftime('%B', strtotime("October 1")),
'november' => strftime('%B', strtotime("November 1")),
'december' => strftime('%B', strtotime("December 1"))
));
$PAGE->requires->yui_module($module, $function, $config);
$done = true;