I ran across this in the bootstrap-datepicker.js
file.
In the _setDate
function the author does
this.viewDate = date && new Date(date)
They also do it a couple other times. What is this doing and why can't they just set
this.viewDate = date
or
this.viewDate = new Date(date)