PHP Tutorial





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
PHP Topics
Introduction Introduction
Syntax Syntax
Data Types Data Types
Operators Operators
Control Structures Control Structures
Functions Functions
Pre-defined Function Pre-defined Function
Calendar Functions Calendar Functions
Date and Time Date and Time
Array Functions Array Functions
Array List Array Functions List1
Array Function List Array Functions List2
Math Functions Math Functions
PHP MYSQL Functions PHP Mysql Functions
File Handling File Handling
Error Handling Error Handling
DB Size DB Size
PHP Mail PHP Mail
String Tokens String Tokens
String Functions String Functions
String Functions List String Functions List1
String Functions List2 String Functions List2
Session Functions Session Functions
Cookies Functions Cookies Functions
Form Variables Form Variables
Running PHP from JS Running PHP from JS
Array To JS Array To JS
JS Array Array to PHP
Encryption Encryption
Common Header Common Header
Forums Ask Your Doubts
Scraps More about PHP
Feedback Feedback
 




Php Calendar Julian Day Count Functions


Tutorials »Php »

Topic

What are the Julian Day Count Functions?



Explanation
cal_to_jd Function:
Syntax:
    int cal_to_jd ( int $calendar, int $month , int $day , int $year )

The above function calculates the Julian day count for a date in the specified calendar. It supports GREGORIAN, JULIAN, JEWISH, FRENCH calendars.

cal_from_jd Function:
Syntax:
    array cal_from_jd  ( int $jd, int $calendar )

The above function Julian day provided into a date of the specified calander. It supports GREGORIAN, JULIAN, JEWISH, FRENCH calendars.

FrenchToJD Function:
Syntax:
    int frenchtojd (int $month, int $day, int $year)

The above function converts a date from the French Republican Calendar to a Julian Day Count. The year should be between 1 and 14, days from 1 to 30, month from 1 to 13.

GregorianToJD Function:
Syntax:
     int gregoriantojd  (int $month, int $day, int $year)

The above function converts a Gregorian date to Julian Day Count. The year should be from -4714 and 9999, month from 1 to 1, days from from 1 to 31.

JDDayOfWeek Function:
Syntax:
    mixed jddayofweek (int $julianday [, int $mode= CAL_DOW_DAYNO  ] )

The above function returns the day of a week based on the mode as integer or string. In "Mode 0" it returns integer ,using "Mode 1" it returns a string of the day, using "Mode 2" it returns an abbreviated string.

JDMonthName Function:
Syntax:
    string jdmonthname ( int $julianday, int $mode)

The above function returns the name of the month, basedon the "Mode". If "Mode 0" for abbreviated-gregorian, "Mode 1" for gregorian,"Mode 2" for Julian abbreviated, "Mode 3" for Julian, "Mode 4" for Jewish, "Mode 5" for French Republican calendars.

JDToFrench Function:
Syntax:
    string jdtofrench (int $juliandaycount)

The above code converts the Julian Day Count to the French Republican Calander.

JDToGregorian Function:
Syntax:
    string jdtogregorian ( int $julianday )

The above function converts the Julian Day Count to Gregorian Date.

JDToJewish
Syntax:
   string jdtojewish (int $juliandaycount 
                       [,bool $hebrew= false [,int $fl= 0 ]])

The above function converts Julian Day Count to the Jewish Calander. The hebrew parameter should be set to "True", "f1" parameter is used to store the hebrew output character.

JDToJulian
Syntax:
    string jdtojulian (int $julianday)

The above function is used to convert Julian Day Count to Julian Calendar Date.

JDtounix
Syntax:
    int jdtounix (int $jday)

The above function will return a Unix timestamp corresponding to the Julian Day given in the parameter jday.

JewishToJD
Syntax:
    int jewishtojd ( int $month, int $day, int $year)

The above function converts a date in Jewish Calander to Julian Day Count.

JulianToJD
Syntax:
    int juliantojd ( int $month, int $day, int $year)

The above function converts a Julian Calendar Date to Julian Date Count. The valid range of Julian Calendar is from 4713 B.C. to 9999 A.D.

unixToJD

Syntax:
    int unixtojd  ([ int $timestamp= time()  ] )

The above function converts a unix timestamp to julian day.





A Note

Learn PHP programming language tutorial with simple and neat example. Hope you enjoy this free tutorial. Do give us your valuable feedback and suggestions on this online tutorial. This is a Copyright Content.

Other Links

web hosting