Yii Framework Forum: FormatDateTimeBehavior - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

FormatDateTimeBehavior FormatDateTimeBehavior automatically converts date and time attributes Rate Topic: -----

#1 User is offline   nexon 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 7
  • Joined: 22-March 10

Posted 01 June 2010 - 12:55 PM

Hi,

I coded a new extension and because of the fact that I am just a hobby developer and a yii newbie, I want you guys to take a look at my work before I release it.

I know it isnt well documentated. By the way, do you know where I can find something like a tutorial how to documentate coding projects professionally?

Overview:
FormatDateTimeBehavior
inspired by and based on DateTimeI18NBehavior by Ricardo Grana.

FormatDateTimeBehavior automatically converts date and time attributes from database to local format (I18N) and vice versa.
But even if you use the original english formats, it may be useful. It could automatically shorten your time fields for example.
Furthermore it provides the following practical features:
* If an attribute is empty, it will be saved to database with the null value (btw: why does yii not behave like this by default?).
* If an attribute is null, it can replace null with another value for views (to realize something like open end for example).

Attached File(s)


0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users