Date

Discussion in 'PHP' started by Banda, Mar 16, 2007.

  1. Banda

    Banda New Member

    Joined:
    Mar 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Hi
    My timetable have 5 periods on my school year. How I can check what is currently period?
     
  2. pradeep

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,645
    Likes Received:
    87
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    http://blog.pradeep.net.in
    Do you have some idea about going about the problem?? If you have we can elaborate/improve on your idea.
     
  3. Banda

    Banda New Member

    Joined:
    Mar 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    $perioidstart = "1.2.2007";
    $perioidend = "3.22.2007";
    $today = "date("d.m.y");
    if ($today > $perioidstart) {
      if ($today < $perioidend) {
         $period = 1;
       }
    }
    
    But that didn't work. Is there is something other way to do this?
     
  4. Banda

    Banda New Member

    Joined:
    Mar 12, 2007
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    Now i know how to do.
    Code:
    date("ymd")
    that is answer to this problem, or I think so.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice