Class WFDateTimeFormatter

Description

The DateTime formatter converts between human-readable dates and PHP 5.2's DateTime object.

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.

IMPORTANT! WFDateTimeFormatter expects a DateTime object. However, oftentimes the formatter is used in conjunction with widgets that normally work with strings, and this the "value" will often be a multi-value string binding. Therefore often when using WFDateTimeFormatter you should use the 'Formatter' binding option rather than the formatter property of the widget. If you are getting BLANK values for your timestamps, and an WFException in the log, this is probably the problem.

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

WFObject
   |
   --WFFormatter
      |
      --WFBaseDateFormatter
         |
         --WFUNIXDateFormatter
            |
            --WFDateTimeFormatter
Method Summary
void stringForValue ( $dtObject)
void valueForString ( $string,  &$error)
Variables
Methods
stringForValue (line 198)
void stringForValue ( $dtObject)
  • $dtObject

Redefinition of:
WFUNIXDateFormatter::stringForValue()
valueForString (line 211)
void valueForString ( $string,  &$error)
  • $string
  • &$error

Redefinition of:
WFUNIXDateFormatter::valueForString()

Inherited Methods

Inherited From WFUNIXDateFormatter

WFUNIXDateFormatter::stringForValue()
WFUNIXDateFormatter::valueForString()

Inherited From WFBaseDateFormatter

WFBaseDateFormatter::__construct()
WFBaseDateFormatter::relativeDate()
WFBaseDateFormatter::replaceRelativeDates()
WFBaseDateFormatter::setFormatString()
WFBaseDateFormatter::setRelativeDateFormatString()

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::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()

Documentation generated on Thu, 14 May 2009 16:20:01 -0400 by phpDocumentor 1.4.2