Convert a Gregorian date to a Julian day count, and then convert a Julian day count to a Unix timestamp:
<?php$jd=gregoriantojd(10,3,1975);echo jdtounix($jd);?>The jdtounix() function converts a Julian day count to a Unix timestamp.
Note: If the parameter jd is not in the Unix epoch (meaning the Gregorian year must be between 1970 and 2037, or jd >= 2440588 and jd <= 2465342), this function will return false. The time returned is local time.
Tip: See unixtojd() to convert a Unix timestamp to a Julian day count.
jdtounix (jd);
| parameter | describe |
|---|---|
| jd | Required. A Julian day number between 2440588 and 2465342. |
| Return value: | Returns the Unix timestamp of the beginning of the specified Julian day. |
|---|---|
| PHP version: | 4+ |