libcalendar library

Functions

fromCjdnToGregorian(int cjdn) DateTime
Converts Chronological Julian Day Number (CJDN) given by parameter cjdn to Gregorian calendar as a DateTime object. The DateTime object returned will always be in UTC.
fromCjdnToIslamic(int cjdn) DateTime
Converts a Chronological Julian Day Number (CJDN) given by parameter cjdn to Islamic calendar as a DateTime object. The DateTime object returned will always be in UTC.
fromGregorianToCjdn(int year, int month, int day) int
Converts Gregorian calendar, given by parameter year, month and day to Chronological Julian Day Number (CJDN).
fromGregorianToIslamic(int year, int month, int day) DateTime
Converts Gregorian calendar, given by parameter year, month and day to Islamic calendar as a DateTime object. The DateTime object returned will always be in UTC.
fromGregorianToJulianDate(DateTime dateTimeInUtc) double
Converts a Gregorian date and time, given by parameter dateTimeInUtc, to Julian Date format as a double.
fromIslamicToCjdn(int year, int month, int day) int
Converts an Islamic calendar date, given by parameters year, month, and day, to a Chronological Julian Day Number (CJDN).
fromIslamicToGregorian(int year, int month, int day) DateTime
Converts Islamic calendar, given by parameter year, month and day to Gregorian calendar as a DateTime object. The DateTime object returned will always be in UTC.
fromJulianDateToGregorian(double jd) DateTime
Converts Julian Date given by parameter jd to Gregorian date and time as DateTime object. The DateTime object returned will be always in UTC.

Exceptions / Errors

CalendarConversionError
Error thrown by calendar converter methods when any invalid operation occurs.