dates in the future.
Take a look in the TimeHelper source at the timeAgoInWords function,
that should give you a good starting place.
On Sep 15, 7:42 pm, "martin.westin...@gmail.com"
<martin.westin...@gmail.com> wrote:
> TimeHelper is used to help format times and dates. I am not sure that
> was what you were looking for?
> TimeHelper::timeAgoInWords() - can take future dates and times and
> will in those cases return the relative time without the "ago" in the
> end.
>
> There is no (and no need for) class designed to help you "set"
> remaining time on your model data.
> When I have needed relative times stored I have turned to strtotime().
> If I want an auction to expire "in 2 weeks" I would just store
> strtotime('+ 2 weeks') in my database (or a datetime formatted string
> of that timestamp is more likely).
>
> Like I said I was not sure what you were asking.
>
> On Sep 15, 7:36 pm, cem <cbay...@gmail.com> wrote:
>
> > Hi I am trying to build an auction software with cakePHP . My problem
> > is :
>
> > As you know i have to set the time remaining for all the auctions .
> > Does cake provide any ready made class for that ?
>
> > I take a look at the time helper but could not find anything
> > useful .
> > Any ideas ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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?hl=en
-~----------~----~----~----~------~----~------~--~---
No comments:
Post a Comment