If I create a new Date with this String "08.12.2017 00:00:00" Google Apps Scripts return an Invalid date but when i try the example with jsfiddle it works.
Google Apps script
var limit = new Date("08.12.2017 00:00:00")
Invalid Date
Jsfiddle
var limit = new Date("08.12.2017 00:00:00");
console.log(limit);
Sat Aug 12 2017 00:00:00 GMT+0200 (Central Europe Daylight Time)
Why is that so?