Created
August 3, 2009 18:58
-
-
Save bradheintz/160763 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<title>Date to Day Converter</title> | |
</head> | |
<body> | |
<p><b>Instructions:</b> Enter a date in MM/DD/YYYY format, get back a day number from 1 to 366.</p> | |
<?php | |
if (isset($_POST['fromdate'])) { | |
$dt = new DateTime($_POST['fromdate']); | |
echo $_POST['fromdate']." is ".(date_format($dt, 'z') + 1)."<br/>\n"; | |
} | |
?> | |
<hr> | |
<form target="<?php echo $PHP_SELF; ?>" method="POST"> | |
<input type="text" name="fromdate"><br /> | |
<input type="submit" name="convertit" value="Convert It"> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment