Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save takafumir/7fc39810a5d274b1d47be6a60f24b9fb to your computer and use it in GitHub Desktop.
Save takafumir/7fc39810a5d274b1d47be6a60f24b9fb to your computer and use it in GitHub Desktop.
Yahooファイナンスの経済指標を1営業日前から表示するブックマークレット(土日対応、祝日は非対応)
javascript:var now = new Date(); var day_offset = 1; if (now.getDay() === 1) { day_offset = 3 }; var yesterday = new Date(now.getFullYear(), now.getMonth(), now.getDate() - day_offset); var prev_date = String(yesterday.getFullYear()) + String(('0' + (yesterday.getMonth() + 1)).slice(-2)) + String(('0' + yesterday.getDate()).slice(-2)); var url = `https://info.finance.yahoo.co.jp/fx/marketcalendar/?d=${prev_date}&c=ALL&i=0`; window.location.href = url;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment