Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • PHP Tutorial
  • PHP Exercises
  • PHP Array
  • PHP String
  • PHP Calendar
  • PHP Filesystem
  • PHP Math
  • PHP Programs
  • PHP Array Programs
  • PHP String Programs
  • PHP Interview Questions
  • PHP GMP
  • PHP IntlChar
  • PHP Image Processing
  • PHP DsSet
  • PHP DsMap
  • PHP Formatter
  • Web Technology
Open In App
Next Article:
PHP Calendar Functions Complete Reference
Next article icon

PHP Calendar Functions Complete Reference

Last Updated : 24 Jan, 2023
Comments
Improve
Suggest changes
Like Article
Like
Report

The calendar extension contains a series of functions to represent the calendar date into a different format. The standard date is based on Julian Day Count. The date count starting from January 1st, 4713 B.C. is known as Julian Day Count. First, the date is converted into Julian Day Count and then converted into a calendar system. 

Example:  The program below illustrate the use of jdtofrench() function.

PHP
<?php // PHP program to demonstrate the // use of jdtofrench() function  // converts date to julian integer $jd = frenchtojd(1, 7, 13);  // prints the julian day integer echo "The julian day integer is ", $jd, "\n";  // converts the Julian day to French date $date = jdtofrench($jd);  // prints the date echo "The french date initially taken was ", ($date), "\n";  ?> 

Output:

The julian day integer is 2380229 The french date initially taken was 1/7/13

The complete list of calendar functions are given below:

PHP Calendar FunctionsDescription
cal_days_in_month()Return the number of days in a month for a specific year. 
cal_from_jd()Returns the array containing calendar information of the specified calendar.
cal_info()Return information about a specified calendar. 
cal_to_jd()Convert a specified date into Julian Day Count. 
easter_date()Returns the Easter date in the year passed as an argument. 
easter_days()Returns the number of days after March 21, that the Easter Day is in the given year
frenchtojd()Convert the date in the French republican calendar and converts it to a Julian Day count.
gregoriantojd()Converts a Gregorian date to a Julian Day Count. 
jddayofweek()Returns the given day of the week of a Julian integer passed in the argument.
jdmonthname()Returns the month name of a Julian day number passed as the argument. 
jdtofrench()Converts a Julian Day Integer to a French date. 
jdtogregorian()Converts a Julian Day Integer to a Gregorian date.
jdtojulian()Convert a Julian day count to a Julian calendar date.
jdtounix()Convert a Julian day date into a Unix Timestamp. 
jewishtojd()Converts a Jewish Date to a Julian Day Count.
juliantojd()Convert Julian calendar Date to Julian Day count
unixtojd()Converts the Unix timestamp to Julian Day count.

Next Article
PHP Calendar Functions Complete Reference

D

dharmendra_kumar
Improve
Article Tags :
  • Web Technologies
  • PHP
  • PHP-date-time

Similar Reads

    PHP intl Functions Complete Reference
    The Complete list of PHP intl Functions are listed below: Collator PHP collator_asort() FunctionPHP collator_compare() FunctionPHP Collator __construct() FunctionPHP Collator create() FunctionPHP collator_sort_with_sort_keys() FunctionPHP collator_sort() Function IntlCalendar PHP IntlCalendar add()
    1 min read
    PHP Math Functions Complete Reference
    The predefined math functions in PHP are used to handle the mathematical operations within the integer and float types. These math functions are part of the PHP core. Installation: These functions have not required any installation. The complete list of PHP math functions are given below:Example: Pr
    3 min read
    PHP String Functions Complete Reference
    Strings are a collection of characters. For example, 'G' is the character and 'GeeksforGeeks' is the string. Installation: These functions are not required any installation. These are the part of PHP core. The complete list of PHP string functions are given below: Example: This program helps us to c
    6 min read
    PHP Filesystem Functions Complete Reference
    The Filesystem function is used to access and manipulate filesystem. It is the part of PHP code so no need to install these functions. For accessing the files on the system, the file path will be used. On Unix system, forward slash (/) is used as a directory separator and on Windows platform, both f
    4 min read
    JavaScript Function Complete Reference
    A JavaScript function is a set of statements that takes inputs, performs specific computations, and produces outputs. Essentially, a function performs tasks or computations and then returns the result to the user.Syntax:function functionName(Parameter1, Parameter2, ..) { // Function body}Example: Be
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences