function extract_suishitsu_data(dt) { // 水質データの抽出 const date = new Date(dt); const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); const hour = date.getHours(); const minute = date.getMinutes(); for(var i = 0; i < a_suishitsu.length; i++) { for(var j = 0; j < a_suishitsu[i].length; j++) { var a = a_suishitsu[i][j].split(","); if(a.length < 16) continue; var date2 = new Date(a[0] + " " + a[1]); if(date2.getTime() < date.getTime()) { suishitsu[i] = a; } else { break; } } } } function extract_data_column(data, num, dt, st) { // 配列dataの中から測定時刻dtのnum列目の値を取り出す const date = new Date(dt); /* const year = date.getFullYear(); const month = date.getMonth() + 1; const day = date.getDate(); const hour = date.getHours(); const minute = date.getMinutes(); */ for(var j = st; j >= 0; j--) { var a = data[j].split(","); //if(a.length < 16) continue; var date2 = new Date(a[0] + " " + a[1]); if(date2.getTime() < date.getTime()) { if(date2.getTime() < (date.getTime() - 1000 * 60 * 30)) { st_buf = j; break; } if(a[num] == "Err") return -1; st_buf = j; return a[num]; } else { continue; } } return -1; }