Generating The Days In A Month

 
<?php$now = time();if (3 < strftime('%H', $now)) { $now += 7200; }$this_month = strftime('%m',$now);$day = mktime(0,0,0,$this_month,1);$month_end = mktime(0,0,0,$this_month+1,1);while ($day < $month_end) {
  print strftime('%c',$day);
  $day += 86400;
}
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.