• PHP Video Tutorials

PHP - Function unixtojd ()



Syntax

unixtojd ( [$timestamp] );

Definition and Usage

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

Parameters

Sr.No Parameter & Description
1

timestamp(Optional)

A unix timestamp to convert.

Return Value

A julian day number as integer.

Example

Try out following example −

<?php
   echo(unixtojd());
?> 

This will produce the following result −

2458086
php_function_reference.htm
Advertisements