Introduction
------------------
I needed British (dd/mm/yyyy) formatted dates throughout my application but found it very difficult to find examples of how to do this - until I found this excellent forum post [http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/](http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/ "http://www.yiiframework.com/forum/index.php?/topic/3649-dealing-with-i18n-date-formats/")
So here is my complete solution - note that I'm using the 'short' date format throughout.
Set the Locale
[...]
protected function beforeSave()
{
if(parent::beforeSave())
{
{
// Format dates based on the locale
foreach($this->metadata->tableSchema->columns as $columnName => $column)
{