PHP unixtojd() Function
Example
Convert a Unix timestamp to a Julian day count:
Run Example »
Definition and Usage
The unixtojd() function converts a Unix timestamp to a Julian day count.
**Note:** A Unix timestamp represents the number of seconds since January 1, 1970 in the Gregorian calendar.
**Tip:** See the jdtounix() function converts a Julian day count to a Unix timestamp.
Syntax
unixtojd(
timestamp);
| Parameters | Description |
|---|---|
| timestamp | Optional. Specifies the Unix timestamp to convert. |
Technical Details
| Return Value: | Returns the Julian day number for the Unix timestamp (the seconds since January 1, 1970), or if timestamp it is not given, returns the Julian day number for the current time. |
|---|---|
| PHP Version: | 4+ |
PHP Calendar Reference Manual