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)? 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; ?> 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)); ?> 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! 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
Archived
This topic is now archived and is closed to further replies.