I am porting a script from perl to PHP that uses Julian Days. The Calendar extensions include some gregorian to JD conversions, but they give me a number like '2452194' (the number of days that have elapsed since this day.. from 0 AD, i dont know) when all I want is 240 (the number of days that have elapsed since this day from the beginning of the year, Jan 1st). Does anyone know an easy way for me to convert Gregorian to this number?
Thanks Drew Martin dmartin@rylos.atmos.colostate.edu
gregorianToJd($month, $day, $year) - gregorianToJd(12, 31, $year - 1)
Although, I'd try date() or date() combined with jdToUnix()...