Using DateBox as a Conversion Library
DateBox can be used as a conversion library if you wish. This is accomplished with a pair of functions that use some of the internal bits of DateBox.
Pre-Requisite
This needs to be done with a valid DateBox on the page somewhere - it need not be visible (put it in a hidden div), but it must be a valid, working DateBox (of any DATE type - DURATION modes will not parse correctly)
Reading a Date
To read a date into the JavaScript date format for further use, use the “parseDate” function:
Outputting a Date
To then convert the date to your perfered output format, feed it back into “callFormat”:
Notes
Of course, the first function yields a basic JavaScript date object - note that this can be used as input for a number of things, not the least of which is DateBox defaults.