Go Back   Forum Care Forums > Development Reference Area > Php Development

Reply
 
LinkBack Thread Tools Display Modes
Date Range Comparison...
Old
  (#1)
news.kingston.net
Guest
 
Posts: n/a
Default Date Range Comparison... - 05-14-2007, 03:54 AM

I was wondering if anyone knew of a PHP function or a way that you can
compare a date range and an IF/ELSE statement or a SWITCH statement? I'm
trying to design code that will open a specific page between a certain set
of dates so that I can include the promotions pages for a whole year and
when the person opens the page, it compares that date with a date range,
then opens the appropriate page for that month or date range.

Any thoughts? Thanks!

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Date Range Comparison...
Old
  (#2)
Martin Mandl - m2m tech support
Guest
 
Posts: n/a
Default Re: Date Range Comparison... - 05-14-2007, 03:55 AM

On Mar 19, 9:12 pm, "news.kingston.net" <gwat...@kingston.net> wrote:
> I was wondering if anyone knew of a PHP function or a way that you can
> compare a date range and an IF/ELSE statement or a SWITCH statement? I'm
> trying to design code that will open a specific page between a certain set
> of dates so that I can include the promotions pages for a whole year and
> when the person opens the page, it compares that date with a date range,
> then opens the appropriate page for that month or date range.
>
> Any thoughts? Thanks!


Dear Mr./Mrs. Net, Kingston Net,

1) translate your date to a unix timestamp
2) do a simple if/else

good luck
Martin

------------------------------------------------
online accounting on bash bases
Online Einnahmen-Ausgaben-Rechnung
http://www.ea-geier.at
------------------------------------------------
m2m server software gmbh
http://www.m2m.at

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: Date Range Comparison...
Old
  (#3)
news.kingston.net
Guest
 
Posts: n/a
Default Re: Date Range Comparison... - 05-14-2007, 03:55 AM

Martin,

Thanks! I have about 12 different conditions, so I will probably try using
a Switch/Case instead of a If/Else, just for faster switching. I just
wasn't sure how to convert the date into a value that was usable.

Thanks again!

Greg W.

"Martin Mandl - m2m tech support" <EMAIL REMOVED> wrote in message
news:EMAIL REMOVED ups.com...
> On Mar 19, 9:12 pm, "news.kingston.net" <gwat...@kingston.net> wrote:
>> I was wondering if anyone knew of a PHP function or a way that you can
>> compare a date range and an IF/ELSE statement or a SWITCH statement? I'm
>> trying to design code that will open a specific page between a certain
>> set
>> of dates so that I can include the promotions pages for a whole year and
>> when the person opens the page, it compares that date with a date range,
>> then opens the appropriate page for that month or date range.
>>
>> Any thoughts? Thanks!

>
> Dear Mr./Mrs. Net, Kingston Net,
>
> 1) translate your date to a unix timestamp
> 2) do a simple if/else
>
> good luck
> Martin
>
> ------------------------------------------------
> online accounting on bash bases
> Online Einnahmen-Ausgaben-Rechnung
> http://www.ea-geier.at
> ------------------------------------------------
> m2m server software gmbh
> http://www.m2m.at
>

   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Contact Us - Forum Care Forums - Archive - Top