jsDate

VBScript native Date functions emulated in Javascript

About

As a scripting language, Javascript is extremely powerful, yet it is pitifully weak with dates and times.  Several types of date/time operations are very difficult to accomplish (and accurately) in Javascript.  VBScript is comparatively very strong in that area, though, possessing several date/time functions, like isDate(), dateAdd(), dateDiff(), datePart(), weekdayName() and monthName().  I've re-created and packaged those functions for Javascript in an include file, called jsDate.  Check it out...

Demo

abbreviate
interval
number
date1 
date2 






 

Source (right-click and save)

jsDate.js, jsDate.html (this page)

notes

history

support

As-is, etc.  If you ask nicely, I may provide support via email.

credits/author

-Rob (@slingfive) Eberhardt, Slingshot Solutions
Use freely, but be honest about it.  I just ask for credit.

« slingfive.com