unction no_yesterdays_stories($datetoget)
>
> {
> //query has returned no stories from yesterday (holiday, etc.)
> //keep subtracting on day from yesterday's date until there are stories
> found
> $datetoget=($datetoget-1);
> get_most_recent_stories($datetoget);
> }
&g
> >
> > > From: [EMAIL PROTECTED]
> > > Date: Wed, 2 Jan 2002 07:55:02 -0800 (PST)
> > > To: Faye Keesic <[EMAIL PROTECTED]>
> > > Cc: [EMAIL PROTECTED]
> > > Subject: Re: [PHP-DB] Date problem with new year
> > >
> > > Ah... the
=JDToGregorian($greg_date);
> --
> Faye Keesic
> Computer Programmer Analyst/Web Page Design
>
>
> > From: [EMAIL PROTECTED]
> > Date: Wed, 2 Jan 2002 07:55:02 -0800 (PST)
> > To: Faye Keesic <[EMAIL PROTECTED]>
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: [
Faye Keesic <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP-DB] Date problem with new year
>
> Ah... the "$datetoget = ($datetoget-1)" is the problem.
>
> Convert the Gregorian Ymd date to Julian, subtract 1, then convert the
> Julian date back
> function no_yesterdays_stories($datetoget)
>
> {
> //query has returned no stories from yesterday (holiday, etc.)
> //keep subtracting on day from yesterday's date until there are stories
> found
> $datetoget=($datetoget-1);
> get_most_recent_stories($datetoget);
&g
Did you convert the dates to PHP's "Julian" format before subtracting?
On Wed, 2 Jan 2002, Faye Keesic wrote:
> I have a db site that always displays the most recent occurrence of news
> stories
>
> The last occurrence of stories was last year (2001-12-31) and up to the new
> year rolling ov
ntil there are stories
found
$datetoget=($datetoget-1);
get_most_recent_stories($datetoget);
}
--
Faye Keesic
Computer Programmer Analyst/Web Page Design
> From: Rick Emery <[EMAIL PROTECTED]>
> Date: Wed, 2 Jan 2002 09:05:42 -0600
> To: [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Da
No bug, mate.
Post your code so that we can help ya...
-Original Message-
From: Faye Keesic [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 8:56 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Date problem with new year
I have a db site that always displays the most recent occu