original_string: public function get_starting_weekday() {
          global $CFG;
  
          if (isset($CFG->calendar_startwday)) {
              $firstday = $CFG->calendar_startwday;
          } else {
              $firstday = get_string('firstdayofweek', 'langconfig');
          }
  
          if (!is_numeric($firstday)) {
              $startingweekday = CALENDAR_DEFAULT_STARTING_WEEKDAY;
          } else {
              $startingweekday = intval($firstday) % 7;
          }
  
          return get_user_preferences('calendar_startwday', $startingweekday);
      }
code: public function get_starting_weekday() {
          global $CFG;
  
          if (isset($CFG->calendar_startwday)) {
              $firstday = $CFG->calendar_startwday;
          } else {
              $firstday = get_string('firstdayofweek', 'langconfig');
          }
  
          if (!is_numeric($firstday)) {
              $startingweekday = CALENDAR_DEFAULT_STARTING_WEEKDAY;
          } else {
              $startingweekday = intval($firstday) % 7;
          }
  
          return get_user_preferences('calendar_startwday', $startingweekday);
      }
code_tokens: public function get_starting_weekday ( ) { global $ CFG ; if ( isset ( $ CFG -> calendar_startwday ) ) { $ firstday = $ CFG -> calendar_startwday ; } else { $ firstday = get_string ( 'firstdayofweek' , 'langconfig' ) ; } if ( ! is_numeric ( $ firstday ) ) { $ startingweekday = CALENDAR_DEFAULT_STARTING_WEEKDAY ; } else { $ startingweekday = intval ( $ firstday ) % 7 ; } return get_user_preferences ( 'calendar_startwday' , $ startingweekday ) ; }
docstring: Returns the index of the starting week day.
  
  This may vary, for example some may consider Monday as the start of the week,
  where as others may consider Sunday the start.
  
  @return int
docstring_tokens: Returns the index of the starting week day .