Fixed moment.js treating Date as an invalid date

Calling moment.js ctor on a Date object with formatting argument makes it invalid.