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($data,1,4);
$mese=substr($data,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
------------------------------------ http://www.teachingonline.it 1 1154
Lampa Dario wrote: 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($data,1,4); $mese=substr($data,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
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. js*******@attglobal.net
================== This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: anon |
last post by:
Dear Microsoft:
In your new ASP.NET 2.0 page model of being able to crosspost to another
page, it would seem that if you were to type that word in Google,
"crosspost" or "cross post", you will...
|
by: mamo74 |
last post by:
Hello.
I am administering a SQL Server (Enterprise Edition on Windows 2003)
from some month and can't understand what is going on in the latest
week (when the db grow a lot).
The DB is around...
|
by: Peter |
last post by:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void) {
char input_string;
printf("Please enter conversion: ");
scanf("%s", input_string);
|
by: tom |
last post by:
Hallo,
I need help on MIDI file,
and precisely about retrieving
few note values
(mainly the "Velocity" value,
corrisponding to the intensity
of a played note)
while the MIDI is playing.
|
by: pamelafluente |
last post by:
Hi,
I would like to get some advice.
I know enough vb.net on win apps, but I have never worked on web
applications
and asp.net.
I would appreciate if you could indicate the most basic...
|
by: mailursubbu |
last post by:
Hi
How to write a program to get the factorial of 4096.
I am working on a Linux m/c.
Best Regards,
Subra
|
by: Senderos |
last post by:
Hello,
i try to break this code, since many days (and nights), without any
success :
<script type="text/javascript">
function p(a,i,c) {
var x=a.charCodeAt(i)+c;
|
by: n |
last post by:
Hello! Here is a problem I hope you can point me to a solution. It
Problem: A teacher needs to know which lesson to teach.
A school has a curriculum with 26 lessons, A-Z.
For a given class,...
|
by: jacob navia |
last post by:
Buffer overflows are a fact of life, and, more specifically, a fact of
C.
All is not lost however. In the book
"Value Range Analysis of C programs" Axel Simon tries to establish a...
|
by: Daniel Orner |
last post by:
Hi all,
I've been trying to pin down a memory leak in IE6 for several WEEKS
now. I've done my share of googling etc., and know all about common
leaks like circular references and closures, but...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |