How would i find out the number of days since... any given year?
IE. the number of days that have passed since 1900.
Date question.
Moderator: General Moderators
try the date functions...
http://www.php.net/manual/en/function.date.php
(you can supply it the current timestamp, with an offset to make it right to be from whatever time you want it to be...
as to the exact numbers i couldnt tell you, but i think that the manual should help (you can use recursive date functions
:
date(mktime(date(......))) ) )
http://www.php.net/manual/en/function.date.php
(you can supply it the current timestamp, with an offset to make it right to be from whatever time you want it to be...
as to the exact numbers i couldnt tell you, but i think that the manual should help (you can use recursive date functions
:
date(mktime(date(......))) ) )
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
uhm... simple math..
Code: Select all
$year = date("Y");
$year = $year - 1900;
$final = $year * 365.25;
echo $final;- mydimension
- Moderator
- Posts: 531
- Joined: Tue Apr 23, 2002 6:00 pm
- Location: Lowell, MA USA
- Contact:
qads, because that's how many days are really in a year. however, just try making a calendar to accomadate that. so we round down to 365 days in a year. but over time this would really mess us up so every four years we add an extra day (leap year) to make up for the round down (.25+.25+.25+.25 = 1). i could go on forever about this but i hope that answers your question
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact: