I need to get the next 0900 date in PHP. For example:
- If it is 0859 right now, the next 0900 is today at 0900
- If it is 0901 right now, the next 0900 is tomorrow at 0900
I'm only interested in the date in yyyymmdd format. Any suggestions on how to do this? I'm thinking that date
and strtotime
are the functions I need to use, but I'm just not sure about how to handle the "next 0900".
This doesn't work: echo date('Ymd', strtotime('next 0900'));