[PHP] Saturdays and Sundays

2005-09-01 Thread Shaun
Hi, Is it possible to get the number of saturdays and sundays for a given month / year? Thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Saturdays and Sundays

2005-09-01 Thread Murray @ PlanetThoughtful
Hi, Is it possible to get the number of saturdays and sundays for a given month / year? Thanks for your help. Hi Shaun, Not sure if there's a graceful PHP solution (there probably is, but can't think of one, myself, right at this moment) but it sounds like what you might need is a

Re: [PHP] Saturdays and Sundays

2005-09-01 Thread Philip Hallstrom
Is it possible to get the number of saturdays and sundays for a given month / year? This seems to work... ?php $month = 9; $year = 2005; $day = 1; $ts = mktime(0, 0, 0, $month, $day, $year); $week_day = date(w, $ts); // 0 (for Sunday) through 6 (for Saturday) if ( $week_day 0 $week_day