Class WFSQLDateFormatter

Description

The SQL Date formatter converts between SQL date format and human-readable dates.

Default formatString is 'r', example: "Thu, 21 Dec 2000 16:01:07 +0200". IMPORTANT! Please be aware that some date formats are not reversible! that is, they can be shown human-readable, but not reversed into a valid time.

Located in /framework/widgets/WFFormatter.php (line 172)

WFObject
   |
   --WFFormatter
      |
      --WFSQLDateFormatter
Variable Summary
string $formatString
Method Summary
WFSQLDateFormatter __construct ()
void setFormatString (string $fmt)
void stringForValue ( $value)
void valueForString ( $string,  &$error)
Variables
string $formatString (line 177)
Methods
Constructor __construct (line 179)
WFSQLDateFormatter __construct ()

Redefinition of:
WFFormatter::__construct()
setFormatString (line 229)

Set the format string (see http://www.php.net/date) to use for the formatter.

void setFormatString (string $fmt)
  • string $fmt: The format string to use in formatting the date.
stringForValue (line 188)

Convert a SQL date/time string into a nicely formatted string.

void stringForValue ( $value)
  • $value

Redefinition of:
WFFormatter::stringForValue()
Retrieve a string for the passed in value.
valueForString (line 204)

Convert a string (hopefully looking like a date/time) into a SQL-compliant date string.

void valueForString ( $string,  &$error)
  • $string
  • &$error

Redefinition of:
WFFormatter::valueForString()
Retreive a value for the passed in string.

Inherited Methods

Inherited From WFFormatter

WFFormatter::__construct()
WFFormatter::editingStringForValue()
WFFormatter::stringForValue()
WFFormatter::valueForString()

Inherited From WFObject

WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForUndefinedKey()
WFObject::__toString()

Documentation generated on Thu, 17 Apr 2008 13:51:46 -0400 by phpDocumentor 1.4.1