Rules, Date, And I18N Prolem

I’m trying to do something like this




array('validFromDate, validToDate', 'date', 'format' => Yii::app()->getDateFormatter()->format('short') ),



I’d like an automatic date validation base or locale date format. Is it possible?

Not answering your question, but it’s I18N, ie:

InternationalizatioN

I…(18 letters)…N

this actually is ‘near’ to work:




array('validFromDate, validToDate', 

      'date', 

      'format' => Yii::app()->getLocale()->getDateFormat('short') ),



the problem is i’m using CJuiDatePicker ans this widget give me a 4-digit year… and so

in english:

10/17/2012 is ok, but it tell me is wrong

10/17/12 is ok, and it tell me it’s ok

in italian:

17/10/2012: is ok, but it tell me is wrong

17/10/12: is ok, and it tell me it’s ok