PHP unixtojd() Function

In this chapter you will learn:

  1. Definition for PHP unixtojd() Function
  2. Syntax for PHP unixtojd() Function
  3. Parameter for PHP unixtojd() Function
  4. Return value from PHP unixtojd() Function
  5. Example - Convert Unix timestamp to Julian Day Count

Definition

The unixtojd() function converts Unix timestamp to Julian Day Count.

Syntax

PHP unixtojd() Function has the following syntax.

unixtojd(timestamp);

Parameter

  • timestamp - Optional. Specifies A unix timestamp to convert

Return

PHP unixtojd() Function returns the Julian Day number for a Unix timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given.

Example

Convert Unix timestamp to Julian Day Count


<?php
echo unixtojd();
?>

The code above generates the following result.

Next chapter...

What you will learn in the next chapter:

  1. What is PHP class_exists() function
  2. Syntax for PHP class_exists() function
  3. Parameters for PHP class_exists() function
  4. Return Values
  5. Example - Check that the class exists before trying to use it
  6. Example - autoload parameter example
Home » PHP Tutorial » PHP Calendar Functions
PHP 5 Predefined Calendar Constants
PHP cal_days_in_month() Function
PHP cal_from_jd() Function
PHP cal_info() Function
PHP cal_to_jd() Function
PHP easter_date() Function
PHP easter_days() Function
PHP frenchtojd() Function
PHP gregoriantojd() Function
PHP jddayofweek() Function
PHP jdmonthname() Function
PHP jdtofrench() Function
PHP jdtogregorian() Function
PHP jdtojewish() Function
PHP jdtojulian() Function
PHP jdtounix() Function
PHP jewishtojd() Function
PHP juliantojd() Function
PHP unixtojd() Function