PHP

PHP Menu

PHP

gregoriantojd() Function - Definition, Syntax, Parameters, Examples

Definition

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

Syntax

gregoriantojd(month, day, year)

Parameters

Parameter Description
month Required. Specifies the month as a number from 1 to 12.
day Required. Specifies the day as a number from 1 to 31.
year Required. Specifies the year as a number between -4714 and 9999.

Example

<?php

$jd = gregoriantojd(7, 1, 2021);
echo $jd;

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods