original_string: public static function get_calendar_day_view($year, $month, $day, $courseid, $categoryid) {
          global $DB, $USER, $PAGE;
  
          // Parameter validation.
          $params = self::validate_parameters(self::get_calendar_day_view_parameters(), [
              'year' => $year,
              'month' => $month,
              'day' => $day,
              'courseid' => $courseid,
              'categoryid' => $categoryid,
          ]);
  
          $context = \context_user::instance($USER->id);
          self::validate_context($context);
  
          $type = \core_calendar\type_factory::get_calendar_instance();
  
          $time = $type->convert_to_timestamp($params['year'], $params['month'], $params['day']);
          $calendar = \calendar_information::create($time, $params['courseid'], $params['categoryid']);
          self::validate_context($calendar->context);
  
          list($data, $template) = calendar_get_view($calendar, 'day');
  
          return $data;
      }
code: public static function get_calendar_day_view($year, $month, $day, $courseid, $categoryid) {
          global $DB, $USER, $PAGE;
  
          // Parameter validation.
          $params = self::validate_parameters(self::get_calendar_day_view_parameters(), [
              'year' => $year,
              'month' => $month,
              'day' => $day,
              'courseid' => $courseid,
              'categoryid' => $categoryid,
          ]);
  
          $context = \context_user::instance($USER->id);
          self::validate_context($context);
  
          $type = \core_calendar\type_factory::get_calendar_instance();
  
          $time = $type->convert_to_timestamp($params['year'], $params['month'], $params['day']);
          $calendar = \calendar_information::create($time, $params['courseid'], $params['categoryid']);
          self::validate_context($calendar->context);
  
          list($data, $template) = calendar_get_view($calendar, 'day');
  
          return $data;
      }
code_tokens: public static function get_calendar_day_view ( $ year , $ month , $ day , $ courseid , $ categoryid ) { global $ DB , $ USER , $ PAGE ; // Parameter validation. $ params = self :: validate_parameters ( self :: get_calendar_day_view_parameters ( ) , [ 'year' => $ year , 'month' => $ month , 'day' => $ day , 'courseid' => $ courseid , 'categoryid' => $ categoryid , ] ) ; $ context = \ context_user :: instance ( $ USER -> id ) ; self :: validate_context ( $ context ) ; $ type = \ core_calendar \ type_factory :: get_calendar_instance ( ) ; $ time = $ type -> convert_to_timestamp ( $ params [ 'year' ] , $ params [ 'month' ] , $ params [ 'day' ] ) ; $ calendar = \ calendar_information :: create ( $ time , $ params [ 'courseid' ] , $ params [ 'categoryid' ] ) ; self :: validate_context ( $ calendar -> context ) ; list ( $ data , $ template ) = calendar_get_view ( $ calendar , 'day' ) ; return $ data ; }
docstring: Get data for the daily calendar view.
  
  @param   int     $year The year to be shown
  @param   int     $month The month to be shown
  @param   int     $day The day to be shown
  @param   int     $courseid The course to be included
  @return  array
docstring_tokens: Get data for the daily calendar view .