have you looked at the php date function? http://php.net/date or you
can do what I did and make a custom helper function that allows one to
custom format dates. like
function niceShort($date_string, $format='l j F Y', $return = false) {
$timestamp = $this->Time->toUnix($date_string);
return($this->output(date($format,$timestamp),$return));
//code here
} // END function
this is 'my' version of the niceShort helper that is in the Time
helper (notice I use some functions from that helper. I found that I
was doing this enough that I extended the function for my own use.
This should give you a starting point ;)
Sam D (the resident old fart)
On 8/21/06, c_doug <[EMAIL PROTECTED]> wrote:
>
> Can someone give me an idea of how to output a date in a certain
> format? In this case I am trying to only output the month in the view.
>
> Can I add a simple function to:
>
> $a['Post']['created']
>
> to make it output just a month or various date formats?
>
> I have searched but haven't been able to apply what I have found.
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---