Created
August 12, 2011 05:14
-
-
Save michaeltwofish/1141501 to your computer and use it in GitHub Desktop.
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
// Format the date field, leaving invalid dates alone | |
if ($candidate->dob != null) { | |
// Check if the entered date is valid | |
if (strtotime($candidate->dob)) { | |
$candidate->dob = date("d/m/Y", strtotime($candidate->dob)); | |
} | |
} else { | |
$candidate->dob = "some new placeholder"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment