var day=1000*60*60*24;
var d1 = Date.parse('Jan 1');
var d2 = Date.parse('Jun 30');
var diff = d2 - d1;
Math.round(diff/day)
You were looking for the Date.parse function.
Take a look here at how it will be handled without a year being passed in.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse
EDIT:
Here is a function that will append the current year and parse the dates. This is not code that should ever make it into production because the slightest change in the format of the date will break it. But to save face for the wrong solution I proposed try using this:
function getDays(strDay1, strDay2){
var day=1000*60*60*24;
strDay1 = strDay1 + ' ' + (new Date().getFullYear());
strDay2 = strDay2 + ' ' + (new Date().getFullYear());
var d1 = Date.parse(strDay1);
var d2 = Date.parse(strDay2);
var diff = d2 - d1;
return Math.round(diff/day)
}
alert(getDays('Jan 1', 'Jun 30'));