Hello

Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: Javascript question  (Read 900 times)

Offline Eiksirf
  • **E!
  • Legendary Member
  • ******
  • Posts: 4398
  • Karma: +10/-0
Javascript question
« on: July 18, 2008, 06:54:33 AM »
I need the javascript for displaying the date one month from today in the format of August 18, 2008
 
With some months being shorter and the problems that come up when it branches into a new year, I\'m having trouble with it.
 
If it\'s too complicated, I\'d settle for a javascript that showed the first of whatever two months from today is: September 1, 2008, although that one still gets tricky when the dates branch into a new year...
 
Anybody?
 
Found this somewhere else and it might help if you know about this kind of stuff:
 
var oneMinute = 60 * 1000 // milliseconds in a minute
var oneHour = oneMinute * 60
var oneDay = oneHour * 24
var oneWeek = oneDay * 7



var today = new Date()
var dateInMS = today.getTime() + oneWeek * 5
var targetDate = new Date(dateInMS)
\"What are you supposed to be, a clown or something?\"
\"Sometimes.\"
 
http://videogamer.today.com

Offline Eiksirf
  • **E!
  • Legendary Member
  • ******
  • Posts: 4398
  • Karma: +10/-0
Javascript question
« Reply #1 on: July 18, 2008, 07:17:41 AM »
Nevermind, I was able to figure it out with those variables I just found.
\"What are you supposed to be, a clown or something?\"
\"Sometimes.\"
 
http://videogamer.today.com

 

SMF spam blocked by CleanTalk