Skip to content

Instantly share code, notes, and snippets.

@letsspeak
Last active February 22, 2017 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save letsspeak/b5fb4947aa132fffd3d0bd6e9ef676a4 to your computer and use it in GitHub Desktop.
Save letsspeak/b5fb4947aa132fffd3d0bd6e9ef676a4 to your computer and use it in GitHub Desktop.
shukujitu
2016/01/01,元日
2016/01/11,成人の日
2016/02/11,建国記念の日
2016/03/20,春分の日
2016/04/29,昭和の日
2016/05/03,憲法記念日
2016/05/04,みどりの日
2016/05/05,こどもの日
2016/07/18,海の日
2016/08/11,山の日
2016/09/19,敬老の日
2016/09/22,秋分の日
2016/10/10,体育の日
2016/11/03,文化の日
2016/11/23,勤労感謝の日
2016/12/23,天皇誕生日
2017/01/01,元日
2017/01/09,成人の日
2017/02/11,建国記念の日
2017/03/20,春分の日
2017/04/29,昭和の日
2017/05/03,憲法記念日
2017/05/04,みどりの日
2017/05/05,こどもの日
2017/07/17,海の日
2017/08/11,山の日
2017/09/18,敬老の日
2017/09/23,秋分の日
2017/10/09,体育の日
2017/11/03,文化の日
2017/11/23,勤労感謝の日
2017/12/23,天皇誕生日
2018/01/01,元日
2018/01/08,成人の日
2018/02/11,建国記念の日
2018/03/21,春分の日
2018/04/29,昭和の日
2018/05/03,憲法記念日
2018/05/04,みどりの日
2018/05/05,こどもの日
2018/07/16,海の日
2018/08/11,山の日
2018/09/17,敬老の日
2018/09/23,秋分の日
2018/10/08,体育の日
2018/11/03,文化の日
2018/11/23,勤労感謝の日
2018/12/23,天皇誕生日
curl -s http://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv | iconv -f Shift_JIS -t UTF-8 | awk -F , '$2~/^[0-9]+\/[0-9]+\/[0-9]+$/{h[$2]=$1;} $4~/^[0-9]+\/[0-9]+\/[0-9]+$/{h[$4]=$3;} $6~/^[0-9]+\/[0-9]+\/[0-9]+/{h[$6]=$5;} END { for (i in h) { split(i, a, "/"); printf "%d/%02d/%02d,%s\n", a[1], a[2], a[3], h[i]}}' | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment