\sfDate
sfDate class.
A class for representing a date/time value as an object.
This class allows for chainable calculations using the sfTime utility class.
- Author: Stephen Riesenberg <sjohnr@gmail.com>
Synopsis
class sfDate
{
- // methods
- public static sfDate getInstance()
- public void __construct()
- public string format()
- public string date()
- public string datetime()
- public string dump()
- public int retrieve()
- public timestamp get()
- public sfDate set()
- public sfDate reset()
- public int cmp()
- public void diff()
- public sfDate __call()
Members
private
-
$init
The original timestamp for this sfDate instance. -
$ts
The timestamp for this sfDate instance.
Methods
public
- __construct() — Construct an sfDate object.
- __call() — Call any function available in the sfTime library, but without the ts parameter.
- cmp() — Compares two date values.
- date() — Formats the date according to the <code>format_date</code> helper of the Date helper group.
- datetime() — Formats the date according to the <code>format_datetime</code> helper of the Date helper group.
- diff() — Gets the difference of two date values in seconds.
- dump() — Format the date as a datetime value.
- format() — Format the date according to the <code>date</code> function.
- get() — Retrieve the timestamp value of this sfDate instance.
- getInstance() — Retrieves a new instance of this class.
- reset() — Resets the timestamp value of this sfDate instance to its original value.
- retrieve() — Retrieves the given unit of time from the timestamp.
- set() — Sets the timestamp value of this sfDate instance.