Fixed moment.js saying Date is not a valid date

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