Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Dynamic Content
Expertise: Beginner
Aug 10, 2000

Converting VBScript to JavaScript

Question:
I need to convert this fairly simple VBScript to a JavaScript? The purpose of the script is to cause a posted seminar event to disappear after the date of the event has passed. Here is my code:

Answer:
Here's how I'd do it:

If you're wondering about the way eventDate is initialized (and who could blame you?), it's due to the way JavaScript works with dates. The month is zero-relative, but everything else is one-relative. Intuitive, huh?
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date