In this article, you will learn how to convert a UNIX timestamp to Julian Day Count in PHP. The unixtojd() function returns the Julian Day Count using the UNIX timestamp. Let’s see its syntax and examples.
Note: Unix timestamp is the number of seconds since January 01, 1970 according to Gregorian Calendar.
What is the syntax of the unixtojd() function in PHP?
unixtojd(timestamp);
Parameter | Details |
---|---|
jd | Julian Day number (minimum range: 2440588 maximum range:2465342) |
Examples of the unixtojd() function
Example 1. In the following example, we simply make conversions from Unix to Julian Day Count.
<?php
echo unixtojd();
?>