It seems unlikely that the code in these VBScript pages will work in many browsers other than MSIE.
Their methods can be used in Windows Scripting Host and in other applications.
Analogous code, and more, can be found via JavaScript Date and Time.
VBScript is invoked (with Option Explicit) as the first scripting on this page → ←.
VBScript Date and Time are Gregorian and Local; Summer Time is disregarded. The date range is a daycount from 0100-01-01 to 9999-12-31 inclusive (-657434 to 2958465 days from CDate(0) = Saturday 1899-12-30 00:00 = CMJD 15018.0); WeekDay default is Sun=1 to Sat=7 (an optional second parameter controls week start). The CDate of a day is 5 decimal digits from 1927-05-18 to 2173-10-13.
Your system is set to display a VBScript CDate as
That should be remembered when reading on; the format is I believe set by Windows Control Panel, Regional Settings. Here, some computed dates are presented thus, while others are coded explicitly in ISO 8601 form, as 1616-04-23 18:30:00.
Anything involving VBScript built-in conversions between String and CDate may be affected by OS localisation.
Interpretation of the fractional part of a negative CDate is quaint on my system; it may depend on version :-
document.write CDate(+1.1), " ; ", CDate(-1.1) gave me, in IE4, "1899-12-31 02:24:00 ; 1899-12-29 02:24:00"
For discussion of the ill-determined question of expressing a difference in dates in terms of years, months, and days, see in JavaScript Date and Time 1 : Date Arithmetic, and links.