Friday, January 27, 2012

Re: v2.x documentation error / typo

yes, it is.
the format behind the hood (model level) should always be unified and
not dependent on the locale settings of the current user/language/
country etc
therefore the format there will always be YYYY-MM-DD.

how you display the date in the form is your locale choice and is not
affected by anything outside the view scope.


On 27 Jan., 09:26, stig <s...@haiinteraktiv.no> wrote:
> > On Jan 26, 2:38 pm, stig <s...@haiinteraktiv.no> wrote:
>
> > > In the 2.0 manual. Caused some headache.http://book.cakephp.org/2.0/en/models/data-validation.html
> > > -> Validation::datetime says to  specify datetime format as
> > > array('datetime', 'dmy'), when really it's supposed to be
> > > array('datetime' => 'dmy')
>
> Actually, I was wrong. It's supposed to be array('datetime', 'dmy'). I
> just had some trouble with this, because even though you have
> specified a format like ('DMY') in your FormHelper::input in the View,
> $validation in Model still receives YMD. Is this expected behavior?

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: