You should not pass a string to new Date , especially for this reason.
Instead, you must specify either individual arguments:
new Date(2014, 6, 4, 4, 0, 0);
Or, if you want to give it time in UTC, try:
var d = new Date(); d.setUTCFullYear(2014); d.setUTCMonth(6); d.setUTCDate(4); d.setUTCHours(4); d.setUTCMinutes(0); d.setUTCSeconds(0); d.setUTCMilliseconds(0);
You can, of course, make a function for this.
Alternatively, if you have a timestamp, you can simply do:
var d = new Date(); d.setTime(1404446400000);
source share