fuel/orm — pull request #104 by anteater (2011-10-13 11:12:46+00:00)
Title: New data_type 'date' for typ

I added a new ```data_type``` ```date``` for typing. This gives you the possibility to retrieve your date/time related model-fields in a format you choose. It works with the ```\Fuel\Date``` object for i18n.
This is a short sample of how to use it.

class Model_Project extends Orm\Model
{
protected static $_table_name = 'projects';
protected static $_primary_key = array('id');

protected static $_properties = array (

'id'	=> array('data_type' => 'int'),
'start'	=> array('data_type' => 'date', 'format_model' => 'timestamp', 'format_view' => 'us'),
'end'	=> array('data_type' => 'date', 'format_model' => 'timestamp', 'format_view' => 'us')

);
}

You can choose any format which is defined in the ```date.php``` config file, either in ```CORE``` or ```APP``` path. ```format_model``` defines the pattern on the persistance layer (db), while ```format_view``` is the pattern of the final represenation on your view.
Have fun, or throw away, if it is not needed :)

Oh, and sorry for the mess. GitHub beginner.