true3000 Posted May 14, 2009 Share Posted May 14, 2009 Alright, I am needing a little help. I need a php date to display ie. 'Saturday May 16th, 2009' that resets every Sunday at 12:01am to the next Saturday. Is there any way this can be done...and how? Quote Link to comment https://forums.phpfreaks.com/topic/158152-solved-php-date-question/ Share on other sites More sharing options...
Brian W Posted May 14, 2009 Share Posted May 14, 2009 Resets how? I'm unclear as to what you mean by that... btw, that date format is: date("l F j, Y"); but the "st", "nd", "rd", "th" endings I don't know how to get. Possibly one of our gurus would. Quote Link to comment https://forums.phpfreaks.com/topic/158152-solved-php-date-question/#findComment-834229 Share on other sites More sharing options...
wildteen88 Posted May 14, 2009 Share Posted May 14, 2009 date("l F j, Y"); but the "st", "nd", "rd", "th" endings I don't know how to get. Possibly one of our gurus would. You'd use the S modifier. Quote Link to comment https://forums.phpfreaks.com/topic/158152-solved-php-date-question/#findComment-834243 Share on other sites More sharing options...
true3000 Posted May 16, 2009 Author Share Posted May 16, 2009 would this work: <?php echo date('m/d/Y h:i:s', strtotime('next tuesday')); ?> and when tuesday comes and goes, will it reset to show the next Tuesday? Quote Link to comment https://forums.phpfreaks.com/topic/158152-solved-php-date-question/#findComment-835147 Share on other sites More sharing options...
Ken2k7 Posted May 16, 2009 Share Posted May 16, 2009 There's no harm in just testing it yourself. But to answer your question, yes, that would do it! Quote Link to comment https://forums.phpfreaks.com/topic/158152-solved-php-date-question/#findComment-835257 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.