Class RaxanDateTime

Description

RaxanDateTime Class for handling dates beyond the 1970 and 2038 Requires ADODB_Date library file to be in the same path as this library Copyright (c) 2008-2010 Raymond Irving

This Class Library is distributed under the terms of the GNU GPL and MIT license with the exception of the ADOdb Date Library which is distributed under it's respective license(s). See the adodb-time.inc.php file for furthor information.

Located in /raxan.datetime.php (line 13)



                    
Variable Summary
static mixed $isDateTimeSupported
static mixed $months
mixed $_dtstr
Method Summary
RaxanDateTime __construct ([$str $str = ''])
String format ($fmt $fmt, [ $strtime = ''], [$strtime $noTrans = false])
int getTimestamp ([ $strtime = ''])
Array parse ($str $str)
void setDate ($str $strtime)
void __toString ()
Variables
static mixed $isDateTimeSupported (line 16)
  • access: protected
static mixed $months (line 15)
  • access: public
mixed $_dtstr = null (line 18)
  • access: protected
Methods
Constructor __construct (line 26)

Date Class Constructor

  • access: public
RaxanDateTime __construct ([$str $str = ''])
  • $str $str: (Optional) String containing a valid date in the formats: Date: dd mmm yyyy,
    mmm dd yyyy,
    mm/dd/yyy,
    yyyy/mm/dd,
    dd/mm/yyyy. Also supports the delimitors "." and "-". Example: mm-dd-yyyy or mm.dd.yyyy Time: hh:mm:ss - Supports the time format that is supported by PHP
format (line 90)

Format and returns a date string. This function used the PHP date() format.

  • access: public
String format ($fmt $fmt, [ $strtime = ''], [$strtime $noTrans = false])
  • $strtime $noTrans: Mixed [optional] DateTime String or ADODB Date TimeStamp
  • $fmt $fmt: String
  • $strtime
getTimestamp (line 62)

Returns an ADODB Date timestamp

  • access: public
int getTimestamp ([ $strtime = ''])
  • $strtime
parse (line 128)

Parses a date string and returns an array containing the date parts otherwise false It's works great with date values returned from MSSQL, MySQL and others.

  • return: Returns an array that contains the date parts: year, month, mday, minutes,hours and seconds
  • access: public
Array parse ($str $str)
  • $str $str: String Supported Date/Time string format
setDate (line 53)

Sets the Date/Time for the Date object

  • access: public
void setDate ($str $strtime)
  • $str $strtime: String containing a valid date
__toString (line 202)
  • access: public
void __toString ()