Tuesday, September 16, 2008

Re: Auction software

I think creating a new helper from the time helper would be easier
right ?
Maybe in next versions they will add time calculations too :)
And I couldn't find the $backwards in the api of time helper . Where
is that ?


On 16 Eylül, 12:33, "martin.westin...@gmail.com"
<martin.westin...@gmail.com> wrote:
> It does take future dates as far I understand the source... there is a
> $backwards variable that detects if you are dealing with the future.
>
> On Sep 16, 11:10 am, RichardAtHome <richardath...@gmail.com> wrote:
>
> > I *think* cem needs a function that works like timeAgoInWords, but for
> > 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: