07-24-2023, 02:52 AM
I have used `Date.prototype` in my WSH-JScripts to do some date calculations. I would like to include these functions in WSH-VBS as well. Basically, mixing JS and VBS code and including JS files in a VBS script works in WSF files.
But I can't get the extended `Date` object to work in VBS. I suppose that is because there is no equivalent `Date` object in VBS, and dates are handled in another way in VBS.
Reimplementing my date functions in VBS seems to be a bad idea (as long as I don't know for sure that there is no other way). It could be possible to write simple JS wrappers in the VBS script which sort of forward to the `Date` objects functions.
If there is any other idea, I'd be very happy to see it.
But I can't get the extended `Date` object to work in VBS. I suppose that is because there is no equivalent `Date` object in VBS, and dates are handled in another way in VBS.
Reimplementing my date functions in VBS seems to be a bad idea (as long as I don't know for sure that there is no other way). It could be possible to write simple JS wrappers in the VBS script which sort of forward to the `Date` objects functions.
If there is any other idea, I'd be very happy to see it.