JScript で DateAdd()

計算する。

ijsc> new Date(new Date().getTime() + 3 * 24 * 60 * 60 * 1000)
Thu Mar 26 22:07:13 UTC+0900 2009

VBScript 使う。

ijsc> var sc = new ActiveXObject('ScriptControl')
ijsc> sc.Language = 'VBScript'
VBScript
ijsc> sc.AddCode('Function AddDays(days, date):AddDays=DateAdd("d", days, date):End Function')
ijsc> new Date(sc.Run('AddDays', 3, new Date().getVarDate()))
Thu Mar 26 22:07:40 UTC+0900 2009

.NET 使う。

ijsc> new Date(new ActiveXObject('System.Globalization.JapaneseCalendar').AddDays(new Date().getVarDate(), 3))
Thu Mar 26 22:07:45 UTC+0900 2009