/ Published in: PHP
This is a simple function that will return an array of all the dates corresponding to the day 'Monday' for a given year. It's pretty simple and may not be the cleanest way but it works for my purpose.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getMondays($year) { $newyear = $year; $week = 0; $day = 0; $mo = 1; $i = 1; while ($week != 1) { $day++; } while ($newyear == $year) { $i++; } } return $mondays; }
URL: http://www.aristoworks.com