## Class TDateFormat

Description

To format dates and/or time according to the current locale use

     <com:TDateFormat Pattern="dd:MMM:yyyy" Value="01/01/2001" />

The date will be formatted according to the current locale (or culture) using the format specified by 'Pattern' attribute.

To format date and/or time for a locale (e.g. de_DE) include a Culture attribute, for example:

     <com:TDateFormat Culture="de_DE" Value="01/01/2001 12:00" />

The date will be formatted according to this format.

If no Pattern was specified then the date will be formatted with the default format (both date and time). If no value for the date is specified then the current date will be used. E.g.:

    <com:TDateFormat />

will result in the current date, formatted with default localized pattern.

Namespace: System.I18N

Properties

- Value, date,
  Gets or sets the date to format. The tag content is used as Value if the Value property is not specified.
- Pattern, string,
  Gets or sets the formatting pattern. The predefined patterns are 'fulldate', 'longdate', 'mediumdate', 'shortdate', 'fulltime',

'longtime', 'mediumtime', and 'shorttime'. Custom patterns can specified when the Pattern property does not match the predefined patterns.

- version: v1.0, last update on Sat Dec 11 15:25:11 EST 2004
- author: Xiang Wei Zhuo <weizhuo[at]gmail[dot]com>

Located in /I18N/TDateFormat.php (line 59)

    TComponent
       |
       --TApplicationComponent
          |
          --TControl
             |
             --TI18NControl
                |
                --TDateFormat

Variable Summary
DateFormat $formatter
Method Summary
void getFormattedDate ()
string getPattern ()
string getPreset (string $string)
string getValue ()
void render (mixed $writer)
void setPattern (string $value)
void setValue (string $value)
Variables
DateFormat $formatter (line 65)

Default DateFormat, set to the application culture.

- static:
- access: protected

Methods
getFormattedDate (line 168)

Renders the localized version of the date-time value.

If the culture is not specified, the default application culture will be used. This method overrides parent's implementation.

- access: protected

void getFormattedDate ()
getPattern (line 92)

Gets the date time format pattern.

- return: format pattern.
- access: public

string getPattern ()
getPreset (line 131)

For a given string, try and find a preset pattern.

- return: a preset pattern if found, null otherwise.
- access: protected

string getPreset (string $string)

- string $string: the preset pattern name

getValue (line 145)

Get the date-time value for this control.

- return: date time value.
- access: public

string getValue ()
render (line 193)

- access: public

void render (mixed $writer)

Redefinition of:

TControl::render()
  Renders the control.

setPattern (line 83)

Sets the date time formatting pattern.

- access: public

void setPattern (string $value)

- string $value: format pattern.

setValue (line 157)

Set the date-time value for this control.

- access: public

void setValue (string $value)

- string $value: the date-time value.

#### Inherited Methods

Inherited From TI18NControl

> TI18NControl::getCharset()
> TI18NControl::getCulture()
> TI18NControl::setCharset()
> TI18NControl::setCulture()

Inherited From TControl

> TControl::__construct()
> TControl::addedControl()
> TControl::addParsedObject()
> TControl::addToPostDataLoader()
> TControl::applyStyleSheetSkin()
> TControl::autoBindProperty()
> TControl::autoDataBindProperties()
> TControl::bindProperty()
> TControl::broadcastEvent()
> TControl::bubbleEvent()
> TControl::clearChildState()
> TControl::clearControlState()
> TControl::clearNamingContainer()
> TControl::clearViewState()
> TControl::convertUniqueIdToClientId()
> TControl::createChildControls()
> TControl::createControlCollection()
> TControl::dataBind()
> TControl::dataBindChildren()
> TControl::dataBindProperties()
> TControl::ensureChildControls()
> TControl::findControl()
> TControl::findControlsByID()
> TControl::findControlsByType()
> TControl::focus()
> TControl::getAdapter()
> TControl::getAllowChildControls()
> TControl::getAttribute()
> TControl::getAttributes()
> TControl::getChildControlsCreated()
> TControl::getClientID()
> TControl::getControls()
> TControl::getControlStage()
> TControl::getControlState()
> TControl::getCustomData()
> TControl::getEnabled()
> TControl::getEnableTheming()
> TControl::getEnableViewState()
> TControl::getHasAdapter()
> TControl::getHasAttributes()
> TControl::getHasChildInitialized()
> TControl::getHasControls()
> TControl::getHasInitialized()
> TControl::getHasLoaded()
> TControl::getHasLoadedPostData()
> TControl::getHasPreRendered()
> TControl::getID()
> TControl::getNamingContainer()
> TControl::getPage()
> TControl::getParent()
> TControl::getRegisteredObject()
> TControl::getSkinID()
> TControl::getSourceTemplateControl()
> TControl::getTemplateControl()
> TControl::getUniqueID()
> TControl::getViewState()
> TControl::getVisible()
> TControl::hasAttribute()
> TControl::initRecursive()
> TControl::isDescendentOf()
> TControl::isObjectRegistered()
> TControl::loadRecursive()
> TControl::loadState()
> TControl::loadStateRecursive()
> TControl::onDataBinding()
> TControl::onInit()
> TControl::onLoad()
> TControl::onPreRender()
> TControl::onUnload()
> TControl::preRenderRecursive()
> TControl::raiseBubbleEvent()
> TControl::registerObject()
> TControl::removeAttribute()
> TControl::removedControl()
> TControl::render()
> TControl::renderChildren()
> TControl::renderControl()
> TControl::saveState()
> TControl::saveStateRecursive()
> TControl::setAdapter()
> TControl::setAttribute()
> TControl::setChildControlsCreated()
> TControl::setControlStage()
> TControl::setControlState()
> TControl::setCustomData()
> TControl::setEnabled()
> TControl::setEnableTheming()
> TControl::setEnableViewState()
> TControl::setID()
> TControl::setPage()
> TControl::setSkinID()
> TControl::setTemplateControl()
> TControl::setViewState()
> TControl::setVisible()
> TControl::trackViewState()
> TControl::traverseChildControls()
> TControl::unbindProperty()
> TControl::unloadRecursive()
> TControl::unregisterObject()
> TControl::__get()

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants

#### Inherited Constants

Inherited from TControl

> TControl::AUTOMATIC_ID_PREFIX
> TControl::CLIENT_ID_SEPARATOR
> TControl::CS_CHILD_INITIALIZED
> TControl::CS_CONSTRUCTED
> TControl::CS_INITIALIZED
> TControl::CS_LOADED
> TControl::CS_PRERENDERED
> TControl::CS_STATE_LOADED
> TControl::ID_FORMAT
> TControl::ID_SEPARATOR
> TControl::IS_CHILD_CREATED
> TControl::IS_CREATING_CHILD
> TControl::IS_DISABLE_THEMING
> TControl::IS_DISABLE_VIEWSTATE
> TControl::IS_ID_SET
> TControl::IS_SKIN_APPLIED
> TControl::IS_STYLESHEET_APPLIED
> TControl::RF_ADAPTER
> TControl::RF_AUTO_BINDINGS
> TControl::RF_CHILD_STATE
> TControl::RF_CONTROLS
> TControl::RF_CONTROLSTATE
> TControl::RF_DATA_BINDINGS
> TControl::RF_EVENTS
> TControl::RF_NAMED_CONTROLS
> TControl::RF_NAMED_CONTROLS_ID
> TControl::RF_NAMED_OBJECTS
> TControl::RF_SKIN_ID

Documentation generated on Sun, 30 Sep 2007 19:15:51 -0400 by phpDocumentor 1.3.0RC4