Others answered this before I did, but here are my tests and notes to supplement the conversation... strtotime() converts a string to a time integer. date() converts an integer to a (optionally formatted) string. I was gonna say you can always just use that rather than epochvonverter.com... but now I understand why you went there. Also note that the manual says this:
"Note: Dates in the m/d/y or d-m-y formats are disambiguated by looking at the separator between the various components: if the separator is a slash (/), then the American m/d/y is assumed; whereas if the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed.
To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates or DateTime::createFromFormat() when possible." -http://www.php.net/manual/en/function.strtotime.php (more quirky things on that page, btw).
It is very interesting that this example with dot is NOT producing d.m.y, but h.m.s! I guess that's because we're working with strtoTIME, not... uh.. strtoDATE :)
Consider this:
$integer = 1382389873;
var_dump($integer);
echo "<br>";
//int(1382389873)
$string = date($integer);
var_dump($string);
echo "<br>";
//string(10) "1382389873"
$formatted=date('d.m.y',$integer);
$laterint=strtotime($formatted."+2 week");
var_dump($laterint);
echo "<br>";
// int(1383682213)
$laterstring=date('d.m.y',$laterint);
var_dump($laterstring);
echo "<br>";
// string(8) "05.11.13"
And here's the juicy part:
$date1 = strtotime("5.11.13");
var_dump($date1);
echo "<br>";
$datestring1=date('d.m.y',$date1);
var_dump($datestring1);
//BAD PHP, BAD!
echo "<br>";
$date2 = strtotime("5.11.2013");
var_dump($date2);
echo "<br>";
$datestring2=date('d.m.y',$date2);
var_dump($datestring2);
echo "<br>";
$date3 = strtotime("5/11/13");
var_dump($date3);
echo "<br>";
$datestring3=date('d.m.y',$date3);
var_dump($datestring3);
echo "<br>";
Really interesting stuff, guys - thank you all! The moral of the story for me is to always be explicit with 4 digit year.
$date=$early?