Very difficult or impossible

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lampa Dario

    Very difficult or impossible

    Hi, this morning I have seen that the script at pagina:
    http://www.teachingonline.it/script/statistiche2.php wasn't working
    properly

    With this code I estract the day of the week in numeric format

    $data=$record['Data_Visita']; // year-month-day date format
    $anno=substr($d ata,1,4);
    $mese=substr($d ata,6,2);
    $giorno=substr( $data,8,2);
    $utime = mktime (0,0,0, $mese,$giorno,$ anno,-1);
    $weekday=date(' w',$utime);
    if ($weekday==0)
    $weekday=7; // days from 1 to 7 (in Italian) echo $weekday;

    This code has worked correctly before sept 30, after this day, I should
    have had weekday=6, then 7, then 1 again, but after 5 I get 3, and so on

    What is the problem?

    Francesco

    --
    Teaching OnLine
    Corsi online di programmazione
    Php, Asp, C, C++, Visual Basic, Delphi
    Linux Shell Programming
    ------------------------------------


  • Jerry Stuckle

    #2
    Re: Very difficult or impossible

    Lampa Dario wrote:[color=blue]
    > Hi, this morning I have seen that the script at pagina:
    > http://www.teachingonline.it/script/statistiche2.php wasn't working
    > properly
    >
    > With this code I estract the day of the week in numeric format
    >
    > $data=$record['Data_Visita']; // year-month-day date format
    > $anno=substr($d ata,1,4);
    > $mese=substr($d ata,6,2);
    > $giorno=substr( $data,8,2);
    > $utime = mktime (0,0,0, $mese,$giorno,$ anno,-1);
    > $weekday=date(' w',$utime);
    > if ($weekday==0)
    > $weekday=7; // days from 1 to 7 (in Italian) echo $weekday;
    >
    > This code has worked correctly before sept 30, after this day, I should
    > have had weekday=6, then 7, then 1 again, but after 5 I get 3, and so on
    >
    > What is the problem?
    >
    > Francesco
    >[/color]

    You posted this problem just two hours ago. We're all volunteers here -
    you need to give a reasonable amount of time for an answer. 24 hours is
    a good choice.

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...