dmBridge PHP API
DMDateTime Class Reference

A custom date class that extends PHP's built-in DateTime class. More...

Public Member Functions


Detailed Description

A custom date class that extends PHP's built-in DateTime class.

All dates passed internally must be instances of this class, and dmBridge will always return dates as objects of this type (except in object DC metadata fields, which will always be returned as strings).

To get data out of an object of this type, use the format() method, which accepts the same parameters as PHP's date() function. The constructor accepts a date string pretty similar to strtotime().

The DateTime class methods (for reference): __construct, format, modify, getTimezone, setTimezone, getOffset, setTime, setDate, setISODate

Author:
Alex Dolski <alex.dolski@unlv.edu> http://www.opensource.org/licenses/mit-license.php

Definition at line 26 of file DMDateTime.php.


Constructor & Destructor Documentation

DMDateTime::__construct ( datetime_str = null)
Parameters:
$datetime_strA date/time string recognizable by strtotime()
Since:
0.1

Definition at line 35 of file DMDateTime.php.

Referenced by __wakeup().


Member Function Documentation

DMDateTime::__sleep ( )

This method works around the fact that built-in PHP objects cannot be serialized.

See also:
__wakeup()
Since:
0.1

Definition at line 56 of file DMDateTime.php.

DMDateTime::__toString ( )

Returns a human-readable date/time.

The format may change and should not be depended on.

Returns:
string
See also:
dmDateTime::format()
Since:
0.1

Definition at line 46 of file DMDateTime.php.

DMDateTime::__wakeup ( )

This method works around the fact that built-in PHP objects cannot be serialized.

See also:
__sleep()
Since:
0.1

Definition at line 67 of file DMDateTime.php.

DMDateTime::asISO8601 ( )
Returns:
ISO8601-formatted date string
Since:
0.1

Definition at line 75 of file DMDateTime.php.

DMDateTime::asRFC3339 ( )

RFC3339 dates are used by Atom feeds, among other potential other uses.

Returns:
string
Since:
0.1

Definition at line 101 of file DMDateTime.php.

DMDateTime::asRFC822 ( )

RFC822 dates are used by RSS feeds, among other potential other uses.

Returns:
string
Since:
0.1

Definition at line 92 of file DMDateTime.php.

DMDateTime::asUnixTimestamp ( )
Returns:
string
Since:
0.1

Definition at line 115 of file DMDateTime.php.

Referenced by equals().

DMDateTime::equals ( obj)
Parameters:
mixedobj
Returns:
boolean

Definition at line 123 of file DMDateTime.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables