前端。。。

js
#1

列 现在有2个数组

var date = [ "1970-01-01" ,

"1970-01-22" ,

"1970-06-09" ,

"1971-02-11" ,

"1971-02-21" ,

"1971-03-01" ,

"1971-05-06" ,

"1972-06-02" ,

"1973-05-18" ,

"1973-11-20" ,

"1973-12-15" ,

"1974-03-12" ,

"1974-03-14" ,

"1975-03-08" ,

"1975-05-01" ,

"1975-07-01" ,

"1976-02-09" ,

"1976-02-17" ,

"1976-02-21" ,

"1976-10-08" ,

"1977-03-06" ,

"1977-12-06" ,

"1978-02-16" ,

"1978-10-10" ,

"1978-10-11" ,

"1978-10-27" ,

"1978-11-20" ,

"1978-12-02" ,

"1978-12-12" ,

"1979-06-07" ,

"1979-10-29" ,

"1980-02-11" ,

"1980-08-01" ,

"1980-09-01" ,

"1980-09-05" ,

"1980-11-02" ,

"1980-11-06" ,

"1980-11-15" ,

"1980-12-05" ,

"1981-03-08" ,

"1981-11-03" ,

"1981-12-07" ,

"1981-12-19" ,

"1982-01-22" ,

"1982-10-04" ,

"1983-02-21" ,

"1983-09-18" ,

"1983-09-26" ,

"1983-11-03" ,

"1984-09-15" ,

"1984-11-06" ,

"1985-03-04" ,

"1985-07-10" ,

"1985-12-10" ,

"1986-04-19" ,

"1986-05-03" ,

"1986-05-08" ,

"1986-06-07" ,

"1986-08-06" ,

"1986-10-15" ,

"1986-12-01" ,

"1986-12-17" ,

"1987-01-09" ,

"1987-02-16" ,

"1987-03-06" ,

"1987-05-14" ,

"1987-06-03" ,

"1987-07-07" ,

"1987-08-31" ,

"1987-09-25" ,

"1987-10-09" ,

"1987-11-13" ,

"1987-11-19" ,

"1987-12-14" ,

"1988-01-16" ,

"1988-04-01" ,

"1988-04-13" ,

"1988-05-06" ,

"1988-05-20" ,

"1988-06-04" ,

"1988-06-12" ,

"1988-06-14" ,

"1988-08-20" ,

"1988-10-29" ,

"1989-01-11" ,

"1989-01-28" ,

"1989-04-26" ,

"1989-06-16" ,

"1989-07-12" ,

"1989-07-14" ,

"1989-08-25" ,

"1989-10-26" ,

"1989-10-30" ,

"1990-01-02" ,

"1991-01-18" ,

"1991-02-14" ,

"1991-02-27" ,

"1991-03-16" ,

"1991-05-13" ,

"1991-06-28" ,];

count=[1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

2,

1,

1,

2,

2,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

3,

2,

1,

1,

1,

1,

1,

1,

2,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

1,

3,

2,

1,

1,

1,

1,

1,

1,

2,

1,

1,

1,

1,

1,

1,

1,

1,

1,

2,

1,

1,

1,

1,

1,

1,

1,

1,];

然后补齐date数组中缺少的日期 然后新插入的日期对应的count设置为0

1赞