parse( ) example
The following code fragment resets an existing date object d1 to a date typed into a text control:
d1.setTime( Date.parse( this.form.dateText.value ))