A component to manage the formatting in the input / output data as a CActiveRecordBehavior. Opportunity makes the job of AutoTimeStamp.
Documentation ¶
Requirements ¶
- Yii 1.1 or above
Installation ¶
- Extract the release file under
protected/components
Usage ¶
See the following code example:
public function behaviors() {
return array(
'FormatBehaviorAutoTimeStamp' => array(
'class' => 'application.components.FormatBehavior',
'typeFormater' => 'dateTime',
'useTimeStamp'=>true,
'autoTimeStamp'=>true,
),
'FormatBehaviorMoney' => array(
'class' => 'application.components.FormatBehavior',
'typeFormater' => 'money',
'collumns'=>array('price', 'freight')
),
'FormatBehaviorData' => array(
'class' => 'application.components.FormatBehavior',
'typeFormater' => 'datetime',
'collumns'=>array('delivery')
),
);
}
Change Log ¶
July 19, 2010 ¶
- Initial release.
typeFormater => datetime
What about 'typeFormater' => 'datetime' and nationalization? Does it supports different date format rules in different languages or is coded to support English / American date formats only?
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.