Convert i18n Yii dateformat to Jquery dateformat

I’ve seen lots of related discussions, but didn’t find any solution yet.

So can someone please tell me if there is a nice way (maybe native Yii-way) to convert local i18n Yii dateformat to Jquery date format.

Basically, this is needed when passing dateformat to init CJuiDatePicker.

So if, for example, Yii::app()->locale->dateFormat returns ‘MMM d, y’, this should be presented as ‘M d, yy’…

Thanks.

I think that there is no nice ways…

Unfortunately CJuiDatePicker use a format that is different from Yii one’s, and in some case incompatible.

I have always mapped one by one all localized formats needed.

Yeah, thanks, this might work.

But I’ve faced another problem with inability of Yii to validate date formats like ‘Feb 13, 2011’, that I’ve posted here