PHP juliantojd() Function

In this chapter you will learn:

  1. Definition for PHP juliantojd() Function
  2. Syntax for PHP juliantojd() Function
  3. Parameter for PHP juliantojd() Function
  4. Return for PHP juliantojd() Function
  5. Example - Convert a Julian date to a Julian Day Count and back to a Julian date:

Definition

The juliantojd() function converts a date from the Julian Calendar to a Julian Day Count.

Syntax

juliantojd(month,day,year);

Parameter

ParameterIs RequiredDescription
monthRequired.Month value as a number from 1 to 12
dayRequired.Day value as a number from 1 to 31
yearRequired.Year value as a number between -4713 and 9999

Return

Convert a Jewish date to a Julian Day Count returns a Julian Day number.

Example

Convert a Julian date to a Julian Day Count and back to a Julian date


<?php/*from jav  a  2s . c o m*/
$jd=juliantojd(6,20,2012);
echo $jd . "\n";
echo jdtojulian($jd);
?>

The code above generates the following result.

Next chapter...

What you will learn in the next chapter:

  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
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