Not sure that the algorithm 'randomly' calculates the date but here you
go
http://www.dennisglass.com/javascript02.html
> -Original Message-
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
> Sent: 24 January 2003 15:16
> To: struts
> Subject: [OT] Programming Challenge
>
>
> Anybod
Yeah, I was using http://javascript.internet.com/calendars/ but got tired of
reading source. I deserve this.
-Original Message-
From: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 10:24 AM
Search engines: Know them, use them.
--
To unsubscribe, e-mail:
: James Turner [mailto:[EMAIL PROTECTED]]
Sent: Friday, 24 January 2003 23:24
To: 'Struts Users Mailing List'
Subject: RE: [OT] Programming Challenge
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 10:16 AM
> To: struts
> Subject: [OT]
Man, do I feel like a dumbass! RTFM the API, Mark!!!
Thanks, Brian!
-Original Message-
From: Brian Lee [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 10:24 AM
example:
var myDate = new Date("July 4, 2006");
var iDayOfWeek = myDate.getDay();
--
To unsubscribe, e-mail:
2003. január 24. 16:16 dátummal Mark Galbreath ezt írtad:
> Anybody know the algorithm for randomly calculating the day of the week,
> given a particular date? E.g., July 4, 2006 = Wednesday. I need to do
> this in JavaScript and for some reason (too much wine last night?) I can't
> get brain eng
> From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
> Sent: Friday, January 24, 2003 10:16 AM
> To: struts
> Subject: [OT] Programming Challenge
>
>
> Anybody know the algorithm for randomly calculating the day
> of the week, given a particular date? E.g., July 4, 2006 =
> Wednesday. I need to
Get the current day. Figure out what day of the week it is.
i.e. Today is Jan 24, Fri. Then get the number of days between then and now.
Then mod it by 7 to get the number of days to shift. This should all be able
to work in JavaScript.
But I think it might be easier to get a JavaScript Date obj
relax ;-)
-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, 24 January 2003 23:20
To: Struts Users Mailing List
Subject: RE: [OT] Programming Challenge
var bob = new Date(...
var dayOfWeek = bob.getDay(); //what day is it here
var utcDayOfWeek = bob.getUTCDay
var bob = new Date(...
var dayOfWeek = bob.getDay(); //what day is it here
var utcDayOfWeek = bob.getUTCDay(); //what day it is in merry old England
right now
returns 0 for Sunday , etc...
-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Friday, 24 January 2003 2
dunno. but i have an 8 year old cousin who does that crap all the time in
his head. never know when he is lying. so the code would be helpful to
figure that stuff out.
-Original Message-
From: Mark Galbreath [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 10:16 AM
To: struts
S
10 matches
Mail list logo