@ 2017-07-07T09:06:57Z <?php
function days_in_month($month, $year) {
return date('t', mktime(0, 0, 0, $month, 1, $year));
}
$months = array(5,6,7);
$year = "2017";
foreach($months as $month)
{
$days_in_month = days_in_month($month, $year);
$first_day = mktime(0,0,0,$month, 1, $year) ;
$day_of_week = date('D', $first_day);
$month = str_pad($month, 2, 0, STR_PAD_LEFT);
//---------------------------------------------------------
//sets the first day of the month to 1
$day_num = 1;
//count up the days, until you've done all of them in the month
while ( $day_num <= $days_in_month )
{
$i = str_pad($day_num, 2, 0, STR_PAD_LEFT);
$day = date('D', mktime(0,0,0,$month, $day_num, $year));
if (date('d.m', mktime(0, 0, 0, $month, $i, $year)) == date('d.m')){
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='today' title='Днес'><span>".$i."</span><br/>/</a>";
}
elseif ($i.".".$month == $_GET['date']){
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='selected' title='Събития на $i".".$month".".$year'><span>".$i."</span><br/>/</a>";
}
elseif ($day == 'Mon'){
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='monday' title='<span class="en">Moday ".$i".".$month.".".$year."</span><span class="bg">Понеделнк ".$i.".".$month.".".$year."</span>'><span>".$i."</span><br/>/</a>";
}
else {
switch ($day) {
case "Tue":
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title='Вторник $i".".$month".".$year'><span>".$i."</span><br/>/</a>";
break;
case "Wed":
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title='Сряда $i".".$month.".".$year.'><span>".$i."</span><br/>/</a>";
break;
case "Thu":
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title='Четвъртък $i".".$month".".$year'><span>".$i."</span><br/>/</a>";
break;
case "Fri":
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title='Петък $i".".$month".".$year'><span>".$i."</span><br/>/</a>";
break;
case "Sat":
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title='Събота $i".".$month".".$year'><span>".$i."</span><br/>/</a>";
break;
case "Sun":
echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title='Неделя $i".".$month".".$year'><span>".$i."</span><br/>/</a>";
// break;
// default:
// echo "Your favorite color is neither red, blue, nor green!";
}
//echo "<a href='".site_url()."/?date=".$i.".".$month."' class='workday' title=$i".".$month".".$year><span>".$i."</span><br/>/</a>";
}
$day_num++;
}
}
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 7.1.7 0.009 0.007 16.76 7.1.6 0.022 0.014 35.11 7.1.5 0.025 0.010 34.48 7.1.4 0.039 0.016 34.33 7.1.3 0.022 0.012 34.25 7.1.2 0.021 0.014 34.43 7.1.1 0.009 0.006 16.50 7.1.0 0.003 0.014 16.34 7.0.20 0.009 0.006 16.48 7.0.19 0.000 0.016 16.51 7.0.18 0.010 0.010 16.00 7.0.17 0.000 0.014 16.12 7.0.16 0.016 0.003 16.11 7.0.15 0.016 0.016 15.84 7.0.14 0.009 0.010 16.01 7.0.13 0.003 0.015 16.30 7.0.12 0.009 0.009 16.36 7.0.11 0.008 0.012 16.25 7.0.10 0.010 0.007 15.88 7.0.9 0.003 0.012 16.11 7.0.8 0.012 0.009 16.23 7.0.7 0.009 0.009 16.15 7.0.6 0.005 0.012 15.98 7.0.5 0.006 0.012 16.10 7.0.4 0.009 0.009 16.21 7.0.3 0.003 0.014 16.39 7.0.2 0.007 0.010 16.30 7.0.1 0.012 0.003 16.13 7.0.0 0.003 0.015 16.31
preferences:dark mode live preview
135.71 ms | 1394 KiB | 7 Q