Created
August 2, 2014 20:11
-
-
Save ItsRab/28d9d7c50907c7293882 to your computer and use it in GitHub Desktop.
Handle the dates when I’m available
This file contains 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 | |
// Work out when I’m available | |
// Manual, can set a date to use, e.g. 25th August | |
$date_available_manual = ''; | |
// If no date is set, just set it to two weeks time | |
$date_available_auto = date('jS F', strtotime('+2 week')); | |
// Assign variable to echo out | |
if (!empty($date_available_manual)) { | |
$date_available = $date_available_manual; | |
} | |
else { | |
$date_available = $date_available_auto; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment