mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 14:03:52 +01:00
MDL-34708 Forms library : Fixed incorrect calendar day displayed across timezones. Credit to Matthew Davidson and team at rose-hulman.edu.
This commit is contained in:
parent
470d47f512
commit
f597dcc008
@ -81,25 +81,25 @@ function form_init_date_js() {
|
||||
$function = 'M.form.dateselector.init_date_selectors';
|
||||
$config = array(array(
|
||||
'firstdayofweek' => get_string('firstdayofweek', 'langconfig'),
|
||||
'mon' => strftime('%a', 360000), // 5th Jan 1970 at 12pm
|
||||
'tue' => strftime('%a', 446400),
|
||||
'wed' => strftime('%a', 532800),
|
||||
'thu' => strftime('%a', 619200),
|
||||
'fri' => strftime('%a', 705600),
|
||||
'sat' => strftime('%a', 792000),
|
||||
'sun' => strftime('%a', 878400),
|
||||
'january' => strftime('%B', 14400), // 1st Jan 1970 at 12pm
|
||||
'february' => strftime('%B', 2692800),
|
||||
'march' => strftime('%B', 5112000),
|
||||
'april' => strftime('%B', 7790400),
|
||||
'may' => strftime('%B', 10382400),
|
||||
'june' => strftime('%B', 13060800),
|
||||
'july' => strftime('%B', 15652800),
|
||||
'august' => strftime('%B', 18331200),
|
||||
'september' => strftime('%B', 21009600),
|
||||
'october' => strftime('%B', 23601600),
|
||||
'november' => strftime('%B', 26280000),
|
||||
'december' => strftime('%B', 28872000)
|
||||
'mon' => strftime('%a', strtotime("Monday")), // 5th Jan 1970 at 12pm
|
||||
'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")), // 1st Jan 1970 at 12pm
|
||||
'february' => strftime('%B', strtotime("February")),
|
||||
'march' => strftime('%B', strtotime("March")),
|
||||
'april' => strftime('%B', strtotime("April")),
|
||||
'may' => strftime('%B', strtotime("May")),
|
||||
'june' => strftime('%B', strtotime("June")),
|
||||
'july' => strftime('%B', strtotime("July")),
|
||||
'august' => strftime('%B', strtotime("August")),
|
||||
'september' => strftime('%B', strtotime("September")),
|
||||
'october' => strftime('%B', strtotime("October")),
|
||||
'november' => strftime('%B', strtotime("November")),
|
||||
'december' => strftime('%B', strtotime("December"))
|
||||
));
|
||||
$PAGE->requires->yui_module($module, $function, $config);
|
||||
$done = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user