Skip to content

Commit

Permalink
Merge branch 'MDL-51651-master' of git://github.com/danpoltawski/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Oct 16, 2015
2 parents 62bf946 + f655414 commit 690e23e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion admin/settings/appearance.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@
array('0' => new lang_string('default', 'calendar'),
'%I:%M %p' => new lang_string('timeformat_12', 'calendar'),
'%H:%M' => new lang_string('timeformat_24', 'calendar'))));
$temp->add(new admin_setting_configselect('calendar_startwday', new lang_string('configstartwday', 'admin'), new lang_string('helpstartofweek', 'admin'), 0,
$temp->add(new admin_setting_configselect('calendar_startwday', new lang_string('configstartwday', 'admin'),
new lang_string('helpstartofweek', 'admin'), get_string('firstdayofweek', 'langconfig'),
array(
0 => new lang_string('sunday', 'calendar'),
1 => new lang_string('monday', 'calendar'),
Expand Down
2 changes: 1 addition & 1 deletion lang/en/langconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$string['alphabet'] = 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z';
$string['backupnameformat'] = '%Y%m%d-%H%M';
$string['decsep'] = '.';
$string['firstdayofweek'] = '0';
$string['firstdayofweek'] = '1';
$string['iso6391'] = 'en';
$string['iso6392'] = 'eng';
$string['labelsep'] = ': ';
Expand Down
3 changes: 2 additions & 1 deletion lib/formslib.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,11 @@ function form_init_date_js() {
global $PAGE;
static $done = false;
if (!$done) {
$calendar = \core_calendar\type_factory::get_calendar_instance();
$module = 'moodle-form-dateselector';
$function = 'M.form.dateselector.init_date_selectors';
$config = array(array(
'firstdayofweek' => get_string('firstdayofweek', 'langconfig'),
'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),
Expand Down

0 comments on commit 690e23e

Please sign in to comment.