Semantic MediaWiki and related extensions
|
Static Public Member Functions | |
static | getJD ( $calendarModel, $year, $month, $day, $hour, $minute, $second) |
static | format ( $value) |
static | getModifiedJulianDate ( $jdValue) |
static | JD2Date ( $jdValue, $calendarModel=null) |
static | JD2Time ( $jdvalue) |
Public Attributes | |
const | J1582 = 2299160.5 |
const | MJD = 2400000.5 |
Public Attributes inherited from SMW\DataValues\Time\CalendarModel | |
const | CM_GREGORIAN = 1 |
const | CM_JULIAN = 2 |
Static Protected Member Functions | |
static | date2JD ( $calendarmodel, $year, $month, $day) |
static | time2JDoffset ( $hours, $minutes, $seconds) |
Julian dates (abbreviated JD) are a continuous count of days and fractions since noon Universal Time on January 1, 4713 BCE (on the Julian calendar).
It is assumed that the changeover from the Julian calendar to the Gregorian calendar occurred in October of 1582.
For dates on or before 4 October 1582, the Julian calendar is used; for dates on or after 15 October 1582, the Gregorian calendar is used.
GNU GPL v2+
|
staticprotected |
Compute the Julian Day number from a given date in the specified calendar model. This calculation assumes that neither calendar has a year 0.
$year | integer representing the year |
$month | integer representing the month |
$day | integer representing the day |
$calendarmodel | integer either CM_GREGORIAN or CM_JULIAN |
RuntimeException |
|
static |
Return a formatted value
$value |
|
static |
integer | $calendarmodel | |
integer | $year | |
integer | $month | |
integer | $day | |
integer | $hour | |
integer | $minute | |
integer | $second |
|
static |
The MJD has a starting point of midnight on November 17, 1858 and is computed by MJD = JD - 2400000.5
float | jdValue |
|
static |
Convert a Julian Day number to a date in the given calendar model. This calculation assumes that neither calendar has a year 0.
$jdValue | float number of Julian Days |
$calendarModel | integer either CM_GREGORIAN or CM_JULIAN |
RuntimeException |
|
static |
Extract the time from a Julian Day number and return it as a string. This conversion is the same for all calendar models.
$jdvalue | float number of Julian Days |
|
staticprotected |
Compute the offset for the Julian Day number from a given time. This computation is the same for all calendar models.
$hours | integer representing the hour |
$minutes | integer representing the minutes |
$seconds | integer representing the seconds |
const SMW\DataValues\Time\JulianDay::J1582 = 2299160.5 |
Moment of switchover to Gregorian calendar.
const SMW\DataValues\Time\JulianDay::MJD = 2400000.5 |
Offset of Julian Days for Modified JD inputs.