Happy to help.

Rick

On Sep 23, 10:48 pm, "Stanley FONG" <[EMAIL PROTECTED]> wrote:
> Rick,
> Thanks, good enough wiki for me.
>
>
>
> On Wed, Sep 24, 2008 at 10:45 AM, rick c <[EMAIL PROTECTED]> wrote:
>
> > It's not in the wiki as yet, Stanley. But all dates and times are now
> > being stored as HabariDateTime, which extends PHP's DateTime class. If
> > you look in HabariDateTime.php, particularly at the __get() function,
> > you'll see 3 particular properties that can be retrieved:
>
> > $date->clone - returns a clone of the object
>
> > $date->sql - returns the object formatted in a way suitable for use in
> > sql queries
>
> > $date->int - returns the integer value of the object in seconds
>
> > $date->mon0 - returns a zero padded 2 digit month number
>
> > $date->mday0 - returns a zero padded 2 digit month day number.
>
> > Other properties that can be retrieved are the same as those listed at
> >http://www.php.net/getdate. In addition, a formatted version of a
> > HabariDateTime object can be retrieved by calling $date->format() or
> > $date->get(). $date->out() echoes a formatted date to the screen. The
> > formatting is determined using the same formatting characters used by
> > the PHP date() function, and listed at
> >http://www.php.net/manual/en/function.date.php.
> > The default formatter is 'c', so calling $date->format() is the same
> > as calling $date->format( 'c' ). You can see all the methods of
> > HabariDateTime athttp://doc.habariproject.org/api/.
>
> > Rick
>
> > On Sep 23, 10:11 pm, "Stanley FONG" <[EMAIL PROTECTED]> wrote:
> > > Thanks Blake, that cured it.
> > > Did I miss this in the wiki, where about is the documentation for this
> > > change?
>
> > > On Wed, Sep 24, 2008 at 1:41 AM, Blake Johnson <[EMAIL PROTECTED]
> > >wrote:
>
> > > > On Sep 21, 11:59 pm, "Stanley FONG" <[EMAIL PROTECTED]> wrote:
> > > > > It would be nice if someone would post a quick fix to
> > > > > $time_ago = intval((time()-strtotime($post->pubdate))/86400)
>
> > > > > that would save me from writing the theme functions again.
>
> > > > Hi Stanley,
>
> > > > That code needs only a minimal change:
>
> > > > $time_ago = intval( ( time() - $post->pubdate->int ) / 86400 );
>
> > > > --Blake
>
> > > --
> > > See me athttp://am.notsowise.net
>
> --
> See me athttp://am.notsowise.net
--~--~---------~--~----~------------~-------~--~----~
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/habari-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to