PHP jdtounix() Function
In this chapter you will learn:
- Definition for PHP jdtounix() Function
- Syntax for PHP jdtounix() Function
- Parameter for PHP jdtounix() Function
- Return value for PHP jdtounix() Function
- Example - Convert a Gregorian date to a Julian Day Count; then convert the Julian Day Count to Unix timestamp
Definition
The jdtounix() function converts Julian Day Count to Unix timestamp.
Syntax
PHP jdtounix() Function has the following syntax.
jdtounix(jd);
Parameter
- jd - Required. A Julian Day number between 2440588 and 2465342
Return
PHP jdtounix() Function returns the Unix timestamp for the start of the specified Julian day.
Example
Convert a Gregorian date to a Julian Day Count; then convert the Julian Day Count to Unix timestamp:
<?php
$jd=gregoriantojd(10,3,2013);
echo jdtounix($jd);
?>
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
- Definition for PHP jewishtojd() Function
- Syntax for PHP jewishtojd() Function
- Parameter for PHP jewishtojd() Function
- Return Value from PHP jewishtojd() Function
- Example - Convert a Jewish date to a Julian Day Count
Home » PHP Tutorial » PHP Calendar Functions