|
-
May 21st, 2003, 11:30 PM
#1
Thread Starter
Frenzied Member
Javascript: how do I add seconds to a date? [resolved]
how do I add seconds to a date?
I'm just starting to work with Javascript but I need this pretty fast.
I need to design a Javascript function that works something like VB's dateadd() function.
It only needs to do seconds so it would look something like this:
function addSeconds(myDate, Seconds)
{
//Needed Code...newDate = myDate + Seconds;
return newDate;
}
Alternately, a function that just adds xx seconds to the current date will work.
function DatePlusSecs(Seconds)
{
var myDate = new Date();
//Needed Code....newDate = myDate + Seconds;
return newDate;
}
I've been searching web sites for this but haven't found anything that i could understand/make work.
Last edited by longwolf; May 27th, 2003 at 05:47 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|