Re: Convert to VBScript to JavaScript ?
- From: Dr John Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 17 Oct 2005 20:19:41 +0100
JRS: In article <435391c8$0$28207$5a62ac22@per-qv1-newsreader-
01.iinet.net.au>, dated Mon, 17 Oct 2005 21:58:19, seen in
news:comp.lang.javascript, Zif <Zifud@xxxxxxxxxxx> posted :
>
> var now = new Date(); // start from today
>
>// Use following to set the date for testing
>// var now = new Date(2005, 9, 21);
>
> // Set the date to the next Friday
> now.setDate(now.getDate() - ((now.getDay()+2)%7));
ISTM add 7 for next Friday.
I think the OP's code allowed today as a starting point, in which case
add 6 and adjust the getDay()+ number by 1.
The OP allowed his posting agent to wrap his code :-(.
--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.
- References:
- Convert to VBScript to JavaScript ?
- From: davidgordon
- Re: Convert to VBScript to JavaScript ?
- From: Zif
- Convert to VBScript to JavaScript ?
- Prev by Date: Re: IE5/6, but not IE4, doing unexpected
- Next by Date: Re: Download Dialog
- Previous by thread: Re: Convert to VBScript to JavaScript ?
- Next by thread: FAQ Update
- Index(es):
Relevant Pages
|
Loading