Skip to content

Commit

Permalink
MDL-34708 Forms library : Fixed incorrect calendar day displayed acro…
Browse files Browse the repository at this point in the history
…ss timezones. Credit to Matthew Davidson and team at rose-hulman.edu.
  • Loading branch information
Aparup Banerjee committed Aug 5, 2012
1 parent f2ddce9 commit 542ed16
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions lib/formslib.php
Expand Up @@ -77,25 +77,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;
Expand Down

0 comments on commit 542ed16

Please sign in to comment.