Go to Post Frisbees [as next year's game piece]. That is all. - Frenchie461 [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 10-03-2006, 22:28
aubinhick990 aubinhick990 is offline
Programmer
FRC #0238 (Cruisin' Crusaders)
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2005
Location: New Hampshire
Posts: 11
aubinhick990 is an unknown quantity at this point
Send a message via AIM to aubinhick990
Logic Question

This is a PHP website....

Okay, I have these variables...
PHP Code:
$itemE_year
    $itemE_month
    $itemE_day
    $itemE_hour
    $itemE_minute
    $itemE_ampm

    $year 
date("Y");
    
$month date("m");
    
$day date("d");
    
    
$hour date("h");
    
$minute date("i");
    
$ampm date("A"); 
Basically they're self-explanatory....the $itemE_x is just a number being assigned via the contents of a text file.

Now, my question is what logic would I need if I wanted to check if the Item's year/month/day and hour/minute has passed my server's year/month/day, hour/minute.

This is the logic I've come up with but it doesn't work quite right...

PHP Code:
if(  (($year >= $itemE_year)) )
{

    if(
$month == $itemE_month)
    {
      if(
$day >= $itemE_day)
         {
        
$DISPBOX "false";
        echo 
"Time has passed!";
         }
    } 

    if( ((
$hour >= $itemE_hour) and ($minute >= $itemE_minute)) and ($ampm == $itemE_ampm) )
{
Whatever else I'm doing....

Any suggestions? Thanks a ton!

Last edited by aubinhick990 : 10-03-2006 at 22:30.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Important question regarding starting position of balls in the BOT Nimmy Rules/Strategy 2 12-02-2006 17:17
Question of the Week!!! (6/14/04) Andy Grady General Forum 23 01-07-2004 15:54
Question of the Week [05-02-04]: The Very Merry Month of May EddieMcD Rumor Mill 10 05-05-2004 14:02
Why I hate Logic EnderofDragon Chit-Chat 2 19-02-2002 21:02


All times are GMT -5. The time now is 06:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi