JavaScript Date for VB developers Working with JavaScript dates are required if the project is more with data entry forms, since there may be a lot of client side validations required based on date. Complete source code can be found here Javascript DateDiff and DateAdd Basically I am a VB developer, when started working on web development. The JavaScript Object model is much different from VB. Hence a good reference is required for equivalent methods. For full working source code download here DateAdd I have used DateAdd function in Visual Basic. Since it is not available in JavaScript, I need to write my own. As I always like VB styled functions to work on any module. I have actually tried to make it similar to VB
DateDiff Like DateAdd function in Classic VB DateDiff is used to find the date difference between two dates. Same as DateAdd there is no JavaScript function available for DateDiff.
The issues related to getYear and getFullYear is GetYear() always returns 2 digits for years 1900-1999 and 4 digits for years starting from 2000.
StartDate 09/18/2009 23:59:00 EndDate 09/19/2009 00:01:00
will give aero as result in the javascript, if you run the test in Visual Basic 6 it will give one. But in VB.Net it will give 0. the sample follows VB.Net way. Complete source code can be found here Javascript DateDiff and DateAdd
DateDiff Like DateAdd function in Classic VB DateDiff is used to find the date difference between two dates. Same as DateAdd there is no JavaScript function available for DateDiff.
The issues related to getYear and getFullYear is GetYear() always returns 2 digits for years 1900-1999 and 4 digits for years starting from 2000.
StartDate 09/18/2009 23:59:00 EndDate 09/19/2009 00:01:00
will give aero as result in the javascript, if you run the test in Visual Basic 6 it will give one. But in VB.Net it will give 0. the sample follows VB.Net way. Complete source code can be found here Javascript DateDiff and DateAdd

No comments:
Post a Comment