Marcelo,

I have created a loop to reformat the array values but I will have a
go at  array_map or even array_walk.

Thanks for your help.

Gerard

On Sep 14, 3:27 am, Marcelo Andrade <[email protected]> wrote:
> On Sun, Sep 13, 2009 at 4:34 PM, Gerard <[email protected]> wrote:
>
> > Marcelo,
>
> > I can't see how Set::format will work.  I want to change the string
> > '2009-09-06' to '6 Sep'.
>
> > The Set::format utility basically uses the sprintf function to
> > rearrange the keys into a string. Or am I missing something?
>
> > Thanks
>
> Oh, I see.  So I'm afraid Set::format will be useless
> in this case.  But you have some alternatives:
>
> 1) Take a look at Chankov's DateFormatter behavior
> (a litttle bit MVC respectful but more ready-to-use)
>
> http://nik.chankov.net/2007/12/20/using-different-date-format-in-cake...
>
> 2) You can apply the proper PHP's date function to
> all members of your list without looping it with an
> array_map or even array_walk call.
>
> 3) Or you can always overwrite the find method in
> your model to get the formatted values.
>
> Hope it helps.
>
> Best regards.
>
> --
> MARCELO DE F. ANDRADE
> Belem, PA, Amazonia, Brazil
> Linux User #221105
>
> http://mfandrade.wordpress.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to