Commit 68c10746 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

Merge branch 'wip-mdl-53701' of https://github.com/rajeshtaneja/moodle

parents a9e9f963 45fb8b59
...@@ -80,27 +80,29 @@ function form_init_date_js() { ...@@ -80,27 +80,29 @@ function form_init_date_js() {
$calendar = \core_calendar\type_factory::get_calendar_instance(); $calendar = \core_calendar\type_factory::get_calendar_instance();
$module = 'moodle-form-dateselector'; $module = 'moodle-form-dateselector';
$function = 'M.form.dateselector.init_date_selectors'; $function = 'M.form.dateselector.init_date_selectors';
$defaulttimezone = date_default_timezone_get();
$config = array(array( $config = array(array(
'firstdayofweek' => $calendar->get_starting_weekday(), 'firstdayofweek' => $calendar->get_starting_weekday(),
'mon' => strftime('%a', strtotime("Monday")), 'mon' => date_format_string(strtotime("Monday"), '%a', $defaulttimezone),
'tue' => strftime('%a', strtotime("Tuesday")), 'tue' => date_format_string(strtotime("Tuesday"), '%a', $defaulttimezone),
'wed' => strftime('%a', strtotime("Wednesday")), 'wed' => date_format_string(strtotime("Wednesday"), '%a', $defaulttimezone),
'thu' => strftime('%a', strtotime("Thursday")), 'thu' => date_format_string(strtotime("Thursday"), '%a', $defaulttimezone),
'fri' => strftime('%a', strtotime("Friday")), 'fri' => date_format_string(strtotime("Friday"), '%a', $defaulttimezone),
'sat' => strftime('%a', strtotime("Saturday")), 'sat' => date_format_string(strtotime("Saturday"), '%a', $defaulttimezone),
'sun' => strftime('%a', strtotime("Sunday")), 'sun' => date_format_string(strtotime("Sunday"), '%a', $defaulttimezone),
'january' => strftime('%B', strtotime("January 1")), 'january' => date_format_string(strtotime("January 1"), '%B', $defaulttimezone),
'february' => strftime('%B', strtotime("February 1")), 'february' => date_format_string(strtotime("February 1"), '%B', $defaulttimezone),
'march' => strftime('%B', strtotime("March 1")), 'march' => date_format_string(strtotime("March 1"), '%B', $defaulttimezone),
'april' => strftime('%B', strtotime("April 1")), 'april' => date_format_string(strtotime("April 1"), '%B', $defaulttimezone),
'may' => strftime('%B', strtotime("May 1")), 'may' => date_format_string(strtotime("May 1"), '%B', $defaulttimezone),
'june' => strftime('%B', strtotime("June 1")), 'june' => date_format_string(strtotime("June 1"), '%B', $defaulttimezone),
'july' => strftime('%B', strtotime("July 1")), 'july' => date_format_string(strtotime("July 1"), '%B', $defaulttimezone),
'august' => strftime('%B', strtotime("August 1")), 'august' => date_format_string(strtotime("August 1"), '%B', $defaulttimezone),
'september' => strftime('%B', strtotime("September 1")), 'september' => date_format_string(strtotime("September 1"), '%B', $defaulttimezone),
'october' => strftime('%B', strtotime("October 1")), 'october' => date_format_string(strtotime("October 1"), '%B', $defaulttimezone),
'november' => strftime('%B', strtotime("November 1")), 'november' => date_format_string(strtotime("November 1"), '%B', $defaulttimezone),
'december' => strftime('%B', strtotime("December 1")) 'december' => date_format_string(strtotime("December 1"), '%B', $defaulttimezone)
)); ));
$PAGE->requires->yui_module($module, $function, $config); $PAGE->requires->yui_module($module, $function, $config);
$done = true; $done = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment