The Little Guy Posted June 10, 2007 Share Posted June 10, 2007 Anyone know how to tell what the first day of the month on (Sunday - Saturday)? Quote Link to comment https://forums.phpfreaks.com/topic/54924-solved-first-day-of-the-month/ Share on other sites More sharing options...
AndyB Posted June 10, 2007 Share Posted June 10, 2007 <?php list($y,$m) = explode("-",date("Y-m")); $fdom = date("l",mktime(0,0,0,$m,1,$y)); echo $fdom; ?> Quote Link to comment https://forums.phpfreaks.com/topic/54924-solved-first-day-of-the-month/#findComment-271632 Share on other sites More sharing options...
soycharliente Posted June 10, 2007 Share Posted June 10, 2007 Returns a number 0 (sun) through 6 (sat). <?php return date("w", mktime(0, 0, 0, $month, 1, $year)); ?> Quote Link to comment https://forums.phpfreaks.com/topic/54924-solved-first-day-of-the-month/#findComment-271633 Share on other sites More sharing options...
The Little Guy Posted June 10, 2007 Author Share Posted June 10, 2007 <?php list($y,$m) = explode("-",date("Y-m")); $fdom = date("l",mktime(0,0,0,$m,1,$y)); echo $fdom; ?> Thanks That works Perfect! Quote Link to comment https://forums.phpfreaks.com/topic/54924-solved-first-day-of-the-month/#findComment-271645 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.