/**
  * Render specific day
  * 
  * $weekday is numeric representation of day in a week. 0 is Sunday -> 6 is 
  * Saturday
  *
  * @param DateValue $day
  * @param integer $weekday
  * @return null
  */
 function renderDay($day, $weekday)
 {
     $class = $weekday == 0 || $weekday == 6 ? 'weekend' : 'weekday';
     return '<td class="' . $class . '">' . $day->getDay() . '</td>';
 }
 /**
  * Render single day
  *
  * @param DateValue $day
  * @param integer $weekday
  * @return string
  */
 function renderDay($day, $weekday)
 {
     $this->smarty->assign(array('day' => $day, 'day_url' => Calendar::getProfileDayUrl($this->user, $day->getYear(), $day->getMonth(), $day->getDay()), 'day_data' => array_var($this->data, $this->year . '-' . $this->month . '-' . $day->getDay())));
     return $this->smarty->fetch(get_template_path('cell', null, 'calendar'));
 }
 /**
  * Return view day records (statically availables)
  *
  * @param Project $project
  * @param DateValue $day
  * @param integer $page
  * @return string
  * @static 
  */
 function getViewDayUrl($project, $day, $page = null)
 {
     $params = array('project_id' => $project->getId(), 'day' => $day->getYear() . '-' . $day->getMonth() . '-' . $day->getDay());
     if ($page !== null) {
         $params['page'] = $page;
     }
     // if
     return assemble_url('project_time_day', $params);
 }