How to add 7 days to the current date?

  • Follow


Hello, to my shame I can't figure it out, plz help.

0
Reply a.r.austin (13) 1/22/2007 6:02:31 PM

Alex wrote on 22 jan 2007 in comp.lang.javascript:

> Hello, to my shame I can't figure it out, plz help.

[please ask your Q also in the posting's body]

var d = new Date();
d.setDate(d.getDate()+7);
alert(d);


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
0
Reply Evertjan 1/22/2007 6:56:26 PM


Alex wrote:

> Hello, to my shame I can't figure it out, plz help.
> 

N=new Date()
N.setDate(N.getDate()+7)

Mick
0
Reply Michael 1/22/2007 7:01:05 PM

In comp.lang.javascript message <1169488951.193122.147110@l53g2000cwa.go
oglegroups.com>, Mon, 22 Jan 2007 10:02:31, Alex <a.r.austin@gmail.com>
posted:
>Hello, to my shame I can't figure it out, plz help.

    with (D = new Date()) setDate(getDate()+7) // civil date

It's a good idea to read the newsgroup and its FAQ.  See below.

-- 
 (c) John Stockton, Surrey, UK.  ?@merlyn.demon.co.uk   Turnpike v6.05   IE 6
 news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
 <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.
0
Reply Dr 1/22/2007 11:31:19 PM

3 Replies
456 Views

(page loaded in 0.108 seconds)

Similiar Articles:













7/22/2012 6:02:36 AM


Reply: