gple Posted February 1, 2010 Share Posted February 1, 2010 How do I find the next saturday from now using the date function? Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/ Share on other sites More sharing options...
MatthewJ Posted February 1, 2010 Share Posted February 1, 2010 echo strtotime("next Saturday"), "\n"; Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/#findComment-1005043 Share on other sites More sharing options...
Jezza Posted February 1, 2010 Share Posted February 1, 2010 In the above guy's PHP I think that will print out the timestamp, in order to use it with the date function you could do this. $timestamp=strtotime("next Saturday"); date("jS F Y",$timestamp); hope it helps Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/#findComment-1005047 Share on other sites More sharing options...
jl5501 Posted February 1, 2010 Share Posted February 1, 2010 or in a more human readable form echo strftime("%d/%m/%Y",strtotime("next Saturday"))."\n"; Link to comment https://forums.phpfreaks.com/topic/190552-get-next-date/#findComment-1005049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.