Skip to content

Commit

Permalink
feat: 加上新舊時刻表的判斷
Browse files Browse the repository at this point in the history
  • Loading branch information
repeat committed Feb 13, 2024
1 parent 5317f7d commit 6db6170
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ var valueline = d3.line()
.y(d => { return y(d.mileage); });

// 讀取 CSV
let timeTableDate = '2023/10/16';
let currentTimeTableDate = '2023/10/16',
nextTimeTableDate = '2024/03/01',
timeTableDate = (today >= new Date(nextTimeTableDate) ? nextTimeTableDate : currentTimeTableDate);
var rawURL = `https://raw.githubusercontent.com/repeat/taiwan-high-speed-rail-timetable/master/${timeTableDate}/timetable.csv`;

d3.csv(rawURL, (d, i) => {
Expand Down

0 comments on commit 6db6170

Please sign in to comment.