好的,我有以下内容:
var alldatesdump = booking.getalldates();
var alldatesdumparray = $.map(booking.getalldates(), function(value, index) {
var splitstring
var dropdates = new Date(value.date);
var dropdate = dropdates.getDate();
var month=new Array();
month[0]="January";
month[1]="February";
month[2]="March";
month[3]="April";
month[4]="May";
month[5]="June";
month[6]="July";
month[7]="August";
month[8]="September";
month[9]="October";
month[10]="November";
month[11]="December";
var dropmonth = month[dropdates.getMonth()];
var dropyear = dropdates.getFullYear();
console.log(dropmonth + "-" + dropyear);
return [value];
});
输出以下内容:
October-2014
October-2014
October-2014
November-2014
November-2014
November-2014
我如何阻止重复值,每月只放一次.... 克里斯