Created
October 26, 2013 06:21
-
-
Save Shelob9/7165885 to your computer and use it in GitHub Desktop.
Takes "yday" key (numeric representation of the day of the year 0-365) from php getthedate() and adds one to get tomorrow, unless it's 31 December, in which case returns 1. MUST FIND USE FOR THIS!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $today = getdate(); | |
| $tomorrow = $today['yday']+1; | |
| if ( ( $tomorrow > 364 && date('L') == 0 ) || ( $tomorrow > 365 && date('L') == 1 ) ) { | |
| $tomorrow = 1; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment