gregoriantojd
int gregoriantojd(int month, int day, int year)
month | Gregorian calendar month number |
day | Gregorian calendar day of month |
year | Gregorian calendar year |
Converts a Gregorian date to a Julian day count.
Returns:
Julian day count; 0 if any parameter is outside the valid range
Description:
gregoriantojd() converts a Gregorian calendar date to a Julian day count. If any parameter is set to a value outside of the acceptable range, the function returns 0.
The following table shows the acceptable ranges for the parameters of this function.
Parameter | Acceptable Range of Values |
---|---|
month | 1 to 12 |
day | 1 to 31 |
year | -4714 to at least 10000 |
To specify a B.C. date, use a negative value for the year parameter.
This function is fairly forgiving ...
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.