This is actually in PEAR.  I use this all the time for my date calculations.

Just use this code in your script and you'll have access to all the
Date_Calc functions...

   include("Date/Calc.php")
   $dc = new Date_Calc;
   $dc->[Date_Calc_Function1];
   $dc->[Date_Calc_Function2];
   $dc->[Date_Calc_Function3];
   etc, etc

--
Aaron Gould
Web Developer
Parts Canada


----- Original Message -----
From: "Greg Macek" <[EMAIL PROTECTED]>
To: "Noodle Snacks" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 10:29 AM
Subject: Re: [PHP] How to do Date Calculation


> You could also check out this class someone wrote called Date_calc. It's
> a nice frontend to all sorts of date calculations you may run across.
> It's helping me quite a bit for my projects.
>
> http://www.phpinsider.com/php/code/Date_Calc/
>
> On Thu, 2002-10-10 at 06:04, Noodle Snacks wrote:
> >
> > "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > On Thursday 10 October 2002 18:37, Jack wrote:
> > > > Dear all
> > > > I'm trying to make a script which will show the month before current
> > month!
> > > > Is there anyway i can do this?
> > > >
> > > > Example :
> > > >
> > > > Current                    Pervious
> > > >
> > > > October                    September
> > >
> > > date("F", strtotime("last month"));
> > To find more about PHP's date/time functions go here:
> >
> > http://www.php.net/manual/en/ref.datetime.php
> >
> > in particular look at:
> >
> > date() -- Format a local time/date
> > mktime() -- Get UNIX timestamp for a date
> > time() -- Return current UNIX timestamp
> > strtotime() --  Parse about any English textual datetime description
into a
> > UNIX timestamp
> >
> >
> > --
> > JJ Harrison
> > [EMAIL PROTECTED]
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to