Created
January 8, 2014 12:20
-
-
Save mtttmpl/8316021 to your computer and use it in GitHub Desktop.
1900 Date System converter to PHP takes $date as unix time and returns days since 1900.
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 | |
function get_1900_date($date) { | |
$start = strtotime("1900-01-01"); | |
$diff = $date - $start; | |
$days = $diff / 86400; | |
return round($days, 0); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment