13日の金曜日です

Jan 13, 2017   #golang 

はじめに

2017年1月13日は金曜日です。 Wikipediaをみると諸説あるようですが、主に海外では縁起の悪い日として知られています。

キリストの最後の晩餐に13人の人がいたことから、13は不吉な数とされた。また、キリストが金曜日に磔刑に処せられたとされていることから、13日の金曜日が不吉であるとされるようになった。一説には、イヴによるアダムの誘惑も大洪水からノアが脱出したのもバベルの塔が壊されたのも13日の金曜日だと言われるが、聖書にそのような記述はない。
北欧神話では12人の神が祝宴を催していた時に、13人目となる招かれざる客ロキが乱入して人気者のバルドルを殺してしまったとされ、キリスト教以前から13を不吉な数としており、13日の金曜日についても伝説を持つ。それは魔女としてキリスト教に追いやられたフリッグが11人の魔女と悪魔を招いて毎週金曜日に悪事を企んでいたからだという。なおゲルマン諸語で「金曜日」を表す語は「フリッグの日」に由来する。
フィリップ4世がフランス全土においてテンプル騎士団の壊滅を図るため、メンバーたちを一斉に逮捕したのが、1307年10月13日の金曜日だった。その後騎士団は異端とされ財産を没収の上解散、幹部たちを火刑に処している。 wikipedia

21世紀に発生する13日の金曜日

そこで、21世紀に13日の金曜日が発生するタイミングを求めてみました。手作業で確認してもいいのですが、どうせなので勉強中のGo言語を使って楽をしています。
作成したプログラムは以下の通りです。

21世紀に発生する13日の金曜日、CSVでの結果は以下の通りとなりました。

2000/10/13,2001/04/13,2001/07/13,2002/09/13,2002/12/13,2003/06/13,2004/02/13,2004/08/13,2005/05/13,2006/01/13,2006/10/13,2007/04/13,2007/07/13,2008/06/13,2009/02/13,2009/03/13,2009/11/13,2010/08/13,2011/05/13,2012/01/13,2012/04/13,2012/07/13,2013/09/13,2013/12/13,2014/06/13,2015/02/13,2015/03/13,2015/11/13,2016/05/13,2017/01/13,2017/10/13,2018/04/13,2018/07/13,2019/09/13,2019/12/13,2020/03/13,2020/11/13,2021/08/13,2022/05/13,2023/01/13,2023/10/13,2024/09/13,2024/12/13,2025/06/13,2026/02/13,2026/03/13,2026/11/13,2027/08/13,2028/10/13,2029/04/13,2029/07/13,2030/09/13,2030/12/13,2031/06/13,2032/02/13,2032/08/13,2033/05/13,2034/01/13,2034/10/13,2035/04/13,2035/07/13,2036/06/13,2037/02/13,2037/03/13,2037/11/13,2038/08/13,2039/05/13,2040/01/13,2040/04/13,2040/07/13,2041/09/13,2041/12/13,2042/06/13,2043/02/13,2043/03/13,2043/11/13,2044/05/13,2045/01/13,2045/10/13,2046/04/13,2046/07/13,2047/09/13,2047/12/13,2048/03/13,2048/11/13,2049/08/13,2050/05/13,2051/01/13,2051/10/13,2052/09/13,2052/12/13,2053/06/13,2054/02/13,2054/03/13,2054/11/13,2055/08/13,2056/10/13,2057/04/13,2057/07/13,2058/09/13,2058/12/13,2059/06/13,2060/02/13,2060/08/13,2061/05/13,2062/01/13,2062/10/13,2063/04/13,2063/07/13,2064/06/13,2065/02/13,2065/03/13,2065/11/13,2066/08/13,2067/05/13,2068/01/13,2068/04/13,2068/07/13,2069/09/13,2069/12/13,2070/06/13,2071/02/13,2071/03/13,2071/11/13,2072/05/13,2073/01/13,2073/10/13,2074/04/13,2074/07/13,2075/09/13,2075/12/13,2076/03/13,2076/11/13,2077/08/13,2078/05/13,2079/01/13,2079/10/13,2080/09/13,2080/12/13,2081/06/13,2082/02/13,2082/03/13,2082/11/13,2083/08/13,2084/10/13,2085/04/13,2085/07/13,2086/09/13,2086/12/13,2087/06/13,2088/02/13,2088/08/13,2089/05/13,2090/01/13,2090/10/13,2091/04/13,2091/07/13,2092/06/13,2093/02/13,2093/03/13,2093/11/13,2094/08/13,2095/05/13,2096/01/13,2096/04/13,2096/07/13,2097/09/13,2097/12/13,2098/06/13,2099/02/13,2099/03/13,2099/11/13,2100/08/13

13日の金曜日ということで、JSON形式でも出力できるようにしています。

[{"Year":2000,"Month":10,"Day":13},{"Year":2001,"Month":4,"Day":13},{"Year":2001,"Month":7,"Day":13},{"Year":2002,"Month":9,"Day":13},{"Year":2002,"Month":12,"Day":13},{"Year":2003,"Month":6,"Day":13},{"Year":2004,"Month":2,"Day":13},{"Year":2004,"Month":8,"Day":13},{"Year":2005,"Month":5,"Day":13},{"Year":2006,"Month":1,"Day":13},{"Year":2006,"Month":10,"Day":13},{"Year":2007,"Month":4,"Day":13},{"Year":2007,"Month":7,"Day":13},{"Year":2008,"Month":6,"Day":13},{"Year":2009,"Month":2,"Day":13},{"Year":2009,"Month":3,"Day":13},{"Year":2009,"Month":11,"Day":13},{"Year":2010,"Month":8,"Day":13},{"Year":2011,"Month":5,"Day":13},{"Year":2012,"Month":1,"Day":13},{"Year":2012,"Month":4,"Day":13},{"Year":2012,"Month":7,"Day":13},{"Year":2013,"Month":9,"Day":13},{"Year":2013,"Month":12,"Day":13},{"Year":2014,"Month":6,"Day":13},{"Year":2015,"Month":2,"Day":13},{"Year":2015,"Month":3,"Day":13},{"Year":2015,"Month":11,"Day":13},{"Year":2016,"Month":5,"Day":13},{"Year":2017,"Month":1,"Day":13},{"Year":2017,"Month":10,"Day":13},{"Year":2018,"Month":4,"Day":13},{"Year":2018,"Month":7,"Day":13},{"Year":2019,"Month":9,"Day":13},{"Year":2019,"Month":12,"Day":13},{"Year":2020,"Month":3,"Day":13},{"Year":2020,"Month":11,"Day":13},{"Year":2021,"Month":8,"Day":13},{"Year":2022,"Month":5,"Day":13},{"Year":2023,"Month":1,"Day":13},{"Year":2023,"Month":10,"Day":13},{"Year":2024,"Month":9,"Day":13},{"Year":2024,"Month":12,"Day":13},{"Year":2025,"Month":6,"Day":13},{"Year":2026,"Month":2,"Day":13},{"Year":2026,"Month":3,"Day":13},{"Year":2026,"Month":11,"Day":13},{"Year":2027,"Month":8,"Day":13},{"Year":2028,"Month":10,"Day":13},{"Year":2029,"Month":4,"Day":13},{"Year":2029,"Month":7,"Day":13},{"Year":2030,"Month":9,"Day":13},{"Year":2030,"Month":12,"Day":13},{"Year":2031,"Month":6,"Day":13},{"Year":2032,"Month":2,"Day":13},{"Year":2032,"Month":8,"Day":13},{"Year":2033,"Month":5,"Day":13},{"Year":2034,"Month":1,"Day":13},{"Year":2034,"Month":10,"Day":13},{"Year":2035,"Month":4,"Day":13},{"Year":2035,"Month":7,"Day":13},{"Year":2036,"Month":6,"Day":13},{"Year":2037,"Month":2,"Day":13},{"Year":2037,"Month":3,"Day":13},{"Year":2037,"Month":11,"Day":13},{"Year":2038,"Month":8,"Day":13},{"Year":2039,"Month":5,"Day":13},{"Year":2040,"Month":1,"Day":13},{"Year":2040,"Month":4,"Day":13},{"Year":2040,"Month":7,"Day":13},{"Year":2041,"Month":9,"Day":13},{"Year":2041,"Month":12,"Day":13},{"Year":2042,"Month":6,"Day":13},{"Year":2043,"Month":2,"Day":13},{"Year":2043,"Month":3,"Day":13},{"Year":2043,"Month":11,"Day":13},{"Year":2044,"Month":5,"Day":13},{"Year":2045,"Month":1,"Day":13},{"Year":2045,"Month":10,"Day":13},{"Year":2046,"Month":4,"Day":13},{"Year":2046,"Month":7,"Day":13},{"Year":2047,"Month":9,"Day":13},{"Year":2047,"Month":12,"Day":13},{"Year":2048,"Month":3,"Day":13},{"Year":2048,"Month":11,"Day":13},{"Year":2049,"Month":8,"Day":13},{"Year":2050,"Month":5,"Day":13},{"Year":2051,"Month":1,"Day":13},{"Year":2051,"Month":10,"Day":13},{"Year":2052,"Month":9,"Day":13},{"Year":2052,"Month":12,"Day":13},{"Year":2053,"Month":6,"Day":13},{"Year":2054,"Month":2,"Day":13},{"Year":2054,"Month":3,"Day":13},{"Year":2054,"Month":11,"Day":13},{"Year":2055,"Month":8,"Day":13},{"Year":2056,"Month":10,"Day":13},{"Year":2057,"Month":4,"Day":13},{"Year":2057,"Month":7,"Day":13},{"Year":2058,"Month":9,"Day":13},{"Year":2058,"Month":12,"Day":13},{"Year":2059,"Month":6,"Day":13},{"Year":2060,"Month":2,"Day":13},{"Year":2060,"Month":8,"Day":13},{"Year":2061,"Month":5,"Day":13},{"Year":2062,"Month":1,"Day":13},{"Year":2062,"Month":10,"Day":13},{"Year":2063,"Month":4,"Day":13},{"Year":2063,"Month":7,"Day":13},{"Year":2064,"Month":6,"Day":13},{"Year":2065,"Month":2,"Day":13},{"Year":2065,"Month":3,"Day":13},{"Year":2065,"Month":11,"Day":13},{"Year":2066,"Month":8,"Day":13},{"Year":2067,"Month":5,"Day":13},{"Year":2068,"Month":1,"Day":13},{"Year":2068,"Month":4,"Day":13},{"Year":2068,"Month":7,"Day":13},{"Year":2069,"Month":9,"Day":13},{"Year":2069,"Month":12,"Day":13},{"Year":2070,"Month":6,"Day":13},{"Year":2071,"Month":2,"Day":13},{"Year":2071,"Month":3,"Day":13},{"Year":2071,"Month":11,"Day":13},{"Year":2072,"Month":5,"Day":13},{"Year":2073,"Month":1,"Day":13},{"Year":2073,"Month":10,"Day":13},{"Year":2074,"Month":4,"Day":13},{"Year":2074,"Month":7,"Day":13},{"Year":2075,"Month":9,"Day":13},{"Year":2075,"Month":12,"Day":13},{"Year":2076,"Month":3,"Day":13},{"Year":2076,"Month":11,"Day":13},{"Year":2077,"Month":8,"Day":13},{"Year":2078,"Month":5,"Day":13},{"Year":2079,"Month":1,"Day":13},{"Year":2079,"Month":10,"Day":13},{"Year":2080,"Month":9,"Day":13},{"Year":2080,"Month":12,"Day":13},{"Year":2081,"Month":6,"Day":13},{"Year":2082,"Month":2,"Day":13},{"Year":2082,"Month":3,"Day":13},{"Year":2082,"Month":11,"Day":13},{"Year":2083,"Month":8,"Day":13},{"Year":2084,"Month":10,"Day":13},{"Year":2085,"Month":4,"Day":13},{"Year":2085,"Month":7,"Day":13},{"Year":2086,"Month":9,"Day":13},{"Year":2086,"Month":12,"Day":13},{"Year":2087,"Month":6,"Day":13},{"Year":2088,"Month":2,"Day":13},{"Year":2088,"Month":8,"Day":13},{"Year":2089,"Month":5,"Day":13},{"Year":2090,"Month":1,"Day":13},{"Year":2090,"Month":10,"Day":13},{"Year":2091,"Month":4,"Day":13},{"Year":2091,"Month":7,"Day":13},{"Year":2092,"Month":6,"Day":13},{"Year":2093,"Month":2,"Day":13},{"Year":2093,"Month":3,"Day":13},{"Year":2093,"Month":11,"Day":13},{"Year":2094,"Month":8,"Day":13},{"Year":2095,"Month":5,"Day":13},{"Year":2096,"Month":1,"Day":13},{"Year":2096,"Month":4,"Day":13},{"Year":2096,"Month":7,"Day":13},{"Year":2097,"Month":9,"Day":13},{"Year":2097,"Month":12,"Day":13},{"Year":2098,"Month":6,"Day":13},{"Year":2099,"Month":2,"Day":13},{"Year":2099,"Month":3,"Day":13},{"Year":2099,"Month":11,"Day":13},{"Year":2100,"Month":8,"Day":13}]

おわりに

日本で仏滅を忌嫌うように、海外では13日の金曜日を嫌っている人がいる…かもしれません。 グローバルな社会を生きる我々は、様々な文化の中で親しまれている、吉日や凶日を知っておくべきではないのでしょうか。