xionhack Posted November 22, 2009 Share Posted November 22, 2009 Hello. Im making a site for a radio show. I want that when the radio show is on air, to show a little button to listen live. I know how to do the button and all that. My only problem is checking if the current time is the time of the show. The show airs every sunday from 5 pm to 8 pm and also the first month of every month it plays an extra hour from 10 am to 11 am. How can I do that? Thanks Link to comment https://forums.phpfreaks.com/topic/182486-check-the-current-time/ Share on other sites More sharing options...
Garethp Posted November 22, 2009 Share Posted November 22, 2009 http://php.net/manual/en/function.date.php Link to comment https://forums.phpfreaks.com/topic/182486-check-the-current-time/#findComment-963111 Share on other sites More sharing options...
xionhack Posted November 22, 2009 Author Share Posted November 22, 2009 I was reading that, but how can i check if its the first sunday of a month? or if the day is a sunday at that time? Thanks Link to comment https://forums.phpfreaks.com/topic/182486-check-the-current-time/#findComment-963112 Share on other sites More sharing options...
xionhack Posted November 22, 2009 Author Share Posted November 22, 2009 I was able to do everything except to know if its the first sunday of the month. Can somebody help me with that? Link to comment https://forums.phpfreaks.com/topic/182486-check-the-current-time/#findComment-963120 Share on other sites More sharing options...
Garethp Posted November 22, 2009 Share Posted November 22, 2009 if(date("D") == "Sun" && date("j") < { //Is the first Sunday of the month } Link to comment https://forums.phpfreaks.com/topic/182486-check-the-current-time/#findComment-963126 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.