This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Javascript and setting dates... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript and setting dates..." Watch "Javascript and setting dates..." New topic
Author

Javascript and setting dates...

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Just wonder, is there an easy way to set a future date in Javascript using the Date object?

See I was looking at the Java Calendar object and you can do something simple like:



To set the date to the current date + 90 days.

Now I need to do something liek this in Javascript, but there is no Calendar object in Javascript , only the Date object and from what I can see you can not set a futire date in this way using Date().

Does anyone knwo hoe to do this?
Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
Sorted it

Simple really:

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript and setting dates...
 
Similar Threads
Output a Calendar with timezone, in W3C datetime format?
xsd datetime format
Calendar in a jsp Page
Setting Value Attribute of Bean Property in jsp in Struts Application
Java Timer...