Class PhpiCalLib_DataTypes_Date

Description

The date data type.

        date               = date-value

        date-value         = date-fullyear date-month date-mday
        date-fullyear      = 4DIGIT
        date-month         = 2DIGIT        ;01-12
        date-mday          = 2DIGIT        ;01-28, 01-29, 01-30, 01-31

Located in /datatypes.php (line 146)

PhpiCalLib_DataType
   |
   --PhpiCalLib_DataTypes_Date
Method Summary
static void DecodeTimeStamp (integer $TimeStamp, bool $Utc)
static void DigitCheck (string $Number, string $TokenName, integer $MinValue, integer $MaxValue)
PhpiCalLib_DataTypes_Date __construct ()
void FromTimeStamp (integer $TimeStamp, bool $Utc)
integer GetFullYear ()
integer GetMonth ()
integer GetMonthDay ()
void Parse (string $EncodedString)
void SetFullYear (number $Number)
void SetMonth (number $Number)
void SetMonthDay (number $Number)
void SetYear (number $Number)
string ToString ()
integer ToTimeStamp ()
Variables
Methods
static method DecodeTimeStamp (line 242)

Decode a timestamp to an array of values like localtime() does, but with support for UTC

  • access: public
static void DecodeTimeStamp (integer $TimeStamp, bool $Utc)
  • integer $TimeStamp: A unix timestamp
  • bool $Utc: true to extract the date WRT to utc, false to extract the "local time"
static method DigitCheck (line 297)

Check that the Number matches 2DIGIT and is in range

  • access: public
static void DigitCheck (string $Number, string $TokenName, integer $MinValue, integer $MaxValue)
  • string $Number: The proposed number
  • string $TokenName
  • integer $MinValue: The minimum legitimate value
  • integer $MaxValue: The maximum legitimate value
Constructor __construct (line 157)

Constructor

  • access: public
PhpiCalLib_DataTypes_Date __construct ()
FromTimeStamp (line 271)

Extract the date from the given timestamp

  • access: public
void FromTimeStamp (integer $TimeStamp, bool $Utc)
  • integer $TimeStamp: Unix epoch WRT to UTC
  • bool $Utc: true to extract the date WRT to utc, false to extract the "local time"
GetFullYear (line 180)

Access the date-fullyear

  • access: public
integer GetFullYear ()
GetMonth (line 212)

Access the date-month

  • access: public
integer GetMonth ()
GetMonthDay (line 232)

Access the date-mday

  • access: public
integer GetMonthDay ()
Parse (line 316)

Extract the date value from the encoded string

  • access: public
void Parse (string $EncodedString)
  • string $EncodedString
SetFullYear (line 166)

Set the date-fullyear component of the date-value

  • access: public
void SetFullYear (number $Number)
  • number $Number
SetMonth (line 201)

Set the date-month component of the date-value

  • access: public
void SetMonth (number $Number)
  • number $Number
SetMonthDay (line 221)

Set the date-mday component of the date-value

  • access: public
void SetMonthDay (number $Number)
  • number $Number
SetYear (line 189)

Set the date-fullyear component of the date-value

  • access: public
void SetYear (number $Number)
  • number $Number: A number of years since 1900
ToString (line 338)

Convert to string

  • access: public
string ToString ()
ToTimeStamp (line 284)

Return the date WRT to midnight, UTC

  • return: Seconds since January 1 1970 00:00:00 GMT
  • access: public
integer ToTimeStamp ()

Inherited Methods

Inherited From PhpiCalLib_DataType

PhpiCalLib_DataType::FromDataType()
PhpiCalLib_DataType::ToDataType()

Documentation generated on Tue, 01 Apr 2008 00:20:06 +0100 by phpDocumentor 1.4.0