SRFCHistoricalDate Class Reference

SRFC_HistoricalDate.php. More...

List of all members.

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

Definition at line 23 of file SRFC_HistoricalDate.php.


Member Function Documentation

SRFCHistoricalDate::create ( year,
month,
day 
)

Definition at line 29 of file SRFC_HistoricalDate.php.

References createFromGregorian(), and createFromJulian().

static SRFCHistoricalDate::leap_gregorian ( year  )  [static, protected]

Definition at line 38 of file SRFC_HistoricalDate.php.

Referenced by createFromGregorian(), and leap_jul_greg().

static SRFCHistoricalDate::leap_julian ( year  )  [static, protected]

Definition at line 42 of file SRFC_HistoricalDate.php.

Referenced by leap_jul_greg().

static SRFCHistoricalDate::leap_jul_greg ( year  )  [static, protected]

Definition at line 46 of file SRFC_HistoricalDate.php.

References leap_gregorian(), and leap_julian().

Referenced by daysInMonth().

SRFCHistoricalDate::createFromGregorian ( year,
month,
day 
) [protected]

Definition at line 50 of file SRFC_HistoricalDate.php.

References leap_gregorian().

Referenced by create().

SRFCHistoricalDate::createFromJulian ( year,
month,
day 
) [protected]

Definition at line 62 of file SRFC_HistoricalDate.php.

Referenced by create().

SRFCHistoricalDate::getDayOfWeek (  ) 

Definition at line 80 of file SRFC_HistoricalDate.php.

static SRFCHistoricalDate::daysInMonth ( year,
month 
) [static]

Definition at line 84 of file SRFC_HistoricalDate.php.

References leap_jul_greg().

Referenced by SRFCalendar::displayCalendar().


Member Data Documentation

Definition at line 25 of file SRFC_HistoricalDate.php.

SRFCHistoricalDate::$m_date [protected]

Definition at line 27 of file SRFC_HistoricalDate.php.


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

Generated on Sun Mar 18 07:15:45 2012 for Semantic MediaWiki by  doxygen 1.5.6