PHP gregoriantojd() function

PHP frenchtojd() function
PHP jddayofweek() function

In this article, you will learn how to convert a Gregorian Calendar date to Julian Date Count. Thanks to the name of the function which is showing the same meaning. Yes, the gregoriantojd() function converts a Gregorian date to Julian Day Count.

What is the syntax of the gregoriantojd() function in PHP?

gregoriantojd(month,day,year);
ParametersDetails
monthSpecify the month number(1-12) – Required
daySpecify the month number(1-31) – Required
yearSpecify the year number (-4714-9999)- Required
PHP gregoriantojd() method

Examples of the gregoriantojd function

Example 1. The following example converts a Gregorian date to a Julian Day Count and vice versa.

<?php
$j_d=gregoriantojd(16,21,2005);
echo $j_d;
echo jdtogregorian($j_d);
?>
PHP frenchtojd() function
PHP jddayofweek() function
en English
X
Scroll to Top