main->get_weekday_abbr_labels(); // Start day of week $week_start = $this->main->get_first_day_of_week(); // Get date suffix $settings = $this->main->get_settings(); // days and weeks vars $running_day = date('w', mktime(0, 0, 0, $month, 1, $year)); $days_in_month = date('t', mktime(0, 0, 0, $month, 1, $year)); $days_in_previous_month = $this->main->get_days_in_previous_month($month, $year); $days_in_this_week = 1; $day_counter = 0; if($week_start == 1) // Monday { if($running_day != 0) $running_day = $running_day - 1; else $running_day = 6; } elseif($week_start == 6) // Saturday { if($running_day != 6) $running_day = $running_day + 1; else $running_day = 0; } elseif($week_start == 5) // Friday { if($running_day < 4) $running_day = $running_day + 2; elseif($running_day == 5) $running_day = 0; elseif($running_day == 6) $running_day = 1; } $rows = 1; ?>