- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
GregorianToJD() function in PHP
The GregorianToJD() function converts a Gregorian date to a Julian day count. It returns a Julian day number.
Note − The valid range for the Gregorian calendar is from November 25, 4714 B.C. to at least December 31, 9999 A.D.
Syntax
GregorianToJD(month, date, year)
Parameters
month − Specifies the month as a number from 1 to 12
date − Specifies the day as a number from 1 to 31
year −Specifies the year as a number between -4714 and 9999
Return
The GregorianToJD() function returns a Julian day number.
Example
The following is an example −
<?php $jd = gregoriantojd(9,27,2017); echo $jd . "<br>"; echo jdtogregorian($jd); ?>
Output
2458024 9/27/2017
Advertisements
To Continue Learning Please Login
Login with Google