functiongetTheSort(year){var theYear =newDate(year);var y = theYear.getFullYear();var flag =1;if(y %4==0&& y %100!=0|| y %400==0){
flag =0}var m = theYear.getMonth();var d = theYear.getDate();
console.log(m);
console.log(d);var days =0;var theDate =[31,28,31,30,31,30,31,31,30,31,30,31];if(m ==0){return d;}else{for(var i =0; i < m; i++){
days += theDate[i];}}if(m >1){if(flag ==0){
days++;}return d + days;}if(m ==1){return d + days;}}var sort =getTheSort('2020-2-24');
console.log('该日是当年的第'+ sort +'天');