Question: ```
 alert(new Date('2010-11-29'));

```

chrome, ff doesn't have problems with this, but safari cries "invalid date". Why ?

edit : ok, as per the comments below, I used string parsing and tried this : 

```
alert(new Date('11-29-2010')); //doesn't work in safari
alert(new Date('29-11-2010')); //doesn't work in safari
alert(new Date('2010-29-11')); //doesn't work in safari

```

**edit Mar 22 2018** : Seems like people are still landing here - Today, I would use `moment` or `date-fns` and be done with it. Date-fns is very much pain free and light as well.

Answer: 
I use moment to solve the problem.
For example

```
var startDate = moment('2015-07-06 08:00', 'YYYY-MM-DD HH:mm').toDate();

```
convert string to Date fromat (you have to know server timezone)

```
new Date('2015-06-16 11:00:00'.replace(/\s+/g, 'T').concat('.000+08:00')).getTime()  

```

where +08:00 = timeZone from server