Semantic MediaWiki and related extensions
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
SRFCHistoricalDate Class Reference

Public Member Functions

 create ( $year, $month, $day)
 
 getDayOfWeek ()
 

Static Public Member Functions

static daysInMonth ( $year, $month)
 

Public Attributes

const GREGORIAN_EPOCH = 1721425.5
 

Protected Member Functions

 createFromGregorian ( $year, $month, $day)
 
 createFromJulian ( $year, $month, $day)
 

Static Protected Member Functions

static leap_gregorian ( $year)
 
static leap_julian ( $year)
 
static leap_jul_greg ( $year)
 

Protected Attributes

 $m_date
 

Detailed Description

SRFC_HistoricalDate.php

This code is lifted from Terry Hurlbut's 'SMW_DV_HxDate.php' class; that code was itself adapted from the Fourmilab Calendar Converter Javascripts by John Walker, who wrote them in 1999 and released them to the public domain.

The internal value, unlike that of the standard SMW Date type, is a 64-bit PHP float. The characteristic gives the days since the epoch.

Technically, the Julian calendar is valid only beginning January 1, 45 BC, when Julius Caesar established it as per a formal Senatus consultum. But currently this is the only calendar currently projectible to earlier times; therefore Julian dates are valid for any year in the Julian Period.

Author
Terry A. Hurlbut
Yaron Koren

The documentation for this class was generated from the following file:

About | General disclaimer | Privacy policy