![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
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
cal_to_jd() function in PHP
The cal_to_jd() function converts a date to Julian day count. It returns a Julian day number.
Syntax
cal_to_jd(calendar, month, day, year)
Parameters
calendar − The calendar to convert from. Possible values −
CAL_GREGORIAN
CAL_JULIAN
CAL_JEWISH
CAL_FRENCH
month − Set the month as a number.
day − Set the day as a number.
year − Set the year as a number.
Return
The cal_to_jd() function returns a Julian day number.
Example
The following is an example −
<?php $res = cal_to_jd(CAL_GREGORIAN,10,15,2018); echo $res; ?>
Output
2458407
Advertisements