PHP

PHP Menu

PHP

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

Definition

The cal_from_jd() function converts a Julian Day Count into a date of the specified calendar.

Syntax

cal_from_jd(jd, calendar)

Parameters

Parameter Description
jd Required. Specifies a Julian Day as an integer.
calendar Required. Specifies the calendar to convert to. Must be one of the following values: CAL_GREGORIAN, CAL_JULIAN, CAL_JEWISH, CAL_FRENCH

Example

<?php

$jd = unixtojd(mktime(0, 0, 0, 6, 20, 2021));
print_r(cal_from_jd($jd, CAL_GREGORIAN));

Introduction

PHP Basics

PHP Advance

PHP OOP

PHP Functions and Methods