solar_terms_24 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (226) hide show
  1. checksums.yaml +7 -0
  2. data/.rspec +3 -0
  3. data/.rubocop.yml +26 -0
  4. data/Gemfile +6 -0
  5. data/Gemfile.lock +81 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +158 -0
  8. data/Rakefile +12 -0
  9. data/Timezones.md +599 -0
  10. data/exe/solar_terms_24 +6 -0
  11. data/lib/solar_terms_24/cache.rb +34 -0
  12. data/lib/solar_terms_24/cli.rb +18 -0
  13. data/lib/solar_terms_24/db/1900.json +26 -0
  14. data/lib/solar_terms_24/db/1901.json +26 -0
  15. data/lib/solar_terms_24/db/1902.json +26 -0
  16. data/lib/solar_terms_24/db/1903.json +26 -0
  17. data/lib/solar_terms_24/db/1904.json +26 -0
  18. data/lib/solar_terms_24/db/1905.json +26 -0
  19. data/lib/solar_terms_24/db/1906.json +26 -0
  20. data/lib/solar_terms_24/db/1907.json +26 -0
  21. data/lib/solar_terms_24/db/1908.json +26 -0
  22. data/lib/solar_terms_24/db/1909.json +26 -0
  23. data/lib/solar_terms_24/db/1910.json +26 -0
  24. data/lib/solar_terms_24/db/1911.json +26 -0
  25. data/lib/solar_terms_24/db/1912.json +26 -0
  26. data/lib/solar_terms_24/db/1913.json +26 -0
  27. data/lib/solar_terms_24/db/1914.json +26 -0
  28. data/lib/solar_terms_24/db/1915.json +26 -0
  29. data/lib/solar_terms_24/db/1916.json +26 -0
  30. data/lib/solar_terms_24/db/1917.json +26 -0
  31. data/lib/solar_terms_24/db/1918.json +26 -0
  32. data/lib/solar_terms_24/db/1919.json +26 -0
  33. data/lib/solar_terms_24/db/1920.json +26 -0
  34. data/lib/solar_terms_24/db/1921.json +26 -0
  35. data/lib/solar_terms_24/db/1922.json +26 -0
  36. data/lib/solar_terms_24/db/1923.json +26 -0
  37. data/lib/solar_terms_24/db/1924.json +26 -0
  38. data/lib/solar_terms_24/db/1925.json +26 -0
  39. data/lib/solar_terms_24/db/1926.json +26 -0
  40. data/lib/solar_terms_24/db/1927.json +26 -0
  41. data/lib/solar_terms_24/db/1928.json +26 -0
  42. data/lib/solar_terms_24/db/1929.json +26 -0
  43. data/lib/solar_terms_24/db/1930.json +26 -0
  44. data/lib/solar_terms_24/db/1931.json +26 -0
  45. data/lib/solar_terms_24/db/1932.json +26 -0
  46. data/lib/solar_terms_24/db/1933.json +26 -0
  47. data/lib/solar_terms_24/db/1934.json +26 -0
  48. data/lib/solar_terms_24/db/1935.json +26 -0
  49. data/lib/solar_terms_24/db/1936.json +26 -0
  50. data/lib/solar_terms_24/db/1937.json +26 -0
  51. data/lib/solar_terms_24/db/1938.json +26 -0
  52. data/lib/solar_terms_24/db/1939.json +26 -0
  53. data/lib/solar_terms_24/db/1940.json +26 -0
  54. data/lib/solar_terms_24/db/1941.json +26 -0
  55. data/lib/solar_terms_24/db/1942.json +26 -0
  56. data/lib/solar_terms_24/db/1943.json +26 -0
  57. data/lib/solar_terms_24/db/1944.json +26 -0
  58. data/lib/solar_terms_24/db/1945.json +26 -0
  59. data/lib/solar_terms_24/db/1946.json +26 -0
  60. data/lib/solar_terms_24/db/1947.json +26 -0
  61. data/lib/solar_terms_24/db/1948.json +26 -0
  62. data/lib/solar_terms_24/db/1949.json +26 -0
  63. data/lib/solar_terms_24/db/1950.json +26 -0
  64. data/lib/solar_terms_24/db/1951.json +26 -0
  65. data/lib/solar_terms_24/db/1952.json +26 -0
  66. data/lib/solar_terms_24/db/1953.json +26 -0
  67. data/lib/solar_terms_24/db/1954.json +26 -0
  68. data/lib/solar_terms_24/db/1955.json +26 -0
  69. data/lib/solar_terms_24/db/1956.json +26 -0
  70. data/lib/solar_terms_24/db/1957.json +26 -0
  71. data/lib/solar_terms_24/db/1958.json +26 -0
  72. data/lib/solar_terms_24/db/1959.json +26 -0
  73. data/lib/solar_terms_24/db/1960.json +26 -0
  74. data/lib/solar_terms_24/db/1961.json +26 -0
  75. data/lib/solar_terms_24/db/1962.json +26 -0
  76. data/lib/solar_terms_24/db/1963.json +26 -0
  77. data/lib/solar_terms_24/db/1964.json +26 -0
  78. data/lib/solar_terms_24/db/1965.json +26 -0
  79. data/lib/solar_terms_24/db/1966.json +26 -0
  80. data/lib/solar_terms_24/db/1967.json +26 -0
  81. data/lib/solar_terms_24/db/1968.json +26 -0
  82. data/lib/solar_terms_24/db/1969.json +26 -0
  83. data/lib/solar_terms_24/db/1970.json +26 -0
  84. data/lib/solar_terms_24/db/1971.json +26 -0
  85. data/lib/solar_terms_24/db/1972.json +26 -0
  86. data/lib/solar_terms_24/db/1973.json +26 -0
  87. data/lib/solar_terms_24/db/1974.json +26 -0
  88. data/lib/solar_terms_24/db/1975.json +26 -0
  89. data/lib/solar_terms_24/db/1976.json +26 -0
  90. data/lib/solar_terms_24/db/1977.json +26 -0
  91. data/lib/solar_terms_24/db/1978.json +26 -0
  92. data/lib/solar_terms_24/db/1979.json +26 -0
  93. data/lib/solar_terms_24/db/1980.json +26 -0
  94. data/lib/solar_terms_24/db/1981.json +26 -0
  95. data/lib/solar_terms_24/db/1982.json +26 -0
  96. data/lib/solar_terms_24/db/1983.json +26 -0
  97. data/lib/solar_terms_24/db/1984.json +26 -0
  98. data/lib/solar_terms_24/db/1985.json +26 -0
  99. data/lib/solar_terms_24/db/1986.json +26 -0
  100. data/lib/solar_terms_24/db/1987.json +26 -0
  101. data/lib/solar_terms_24/db/1988.json +26 -0
  102. data/lib/solar_terms_24/db/1989.json +26 -0
  103. data/lib/solar_terms_24/db/1990.json +26 -0
  104. data/lib/solar_terms_24/db/1991.json +26 -0
  105. data/lib/solar_terms_24/db/1992.json +26 -0
  106. data/lib/solar_terms_24/db/1993.json +26 -0
  107. data/lib/solar_terms_24/db/1994.json +26 -0
  108. data/lib/solar_terms_24/db/1995.json +26 -0
  109. data/lib/solar_terms_24/db/1996.json +26 -0
  110. data/lib/solar_terms_24/db/1997.json +26 -0
  111. data/lib/solar_terms_24/db/1998.json +26 -0
  112. data/lib/solar_terms_24/db/1999.json +26 -0
  113. data/lib/solar_terms_24/db/2000.json +26 -0
  114. data/lib/solar_terms_24/db/2001.json +26 -0
  115. data/lib/solar_terms_24/db/2002.json +26 -0
  116. data/lib/solar_terms_24/db/2003.json +26 -0
  117. data/lib/solar_terms_24/db/2004.json +26 -0
  118. data/lib/solar_terms_24/db/2005.json +26 -0
  119. data/lib/solar_terms_24/db/2006.json +26 -0
  120. data/lib/solar_terms_24/db/2007.json +26 -0
  121. data/lib/solar_terms_24/db/2008.json +26 -0
  122. data/lib/solar_terms_24/db/2009.json +26 -0
  123. data/lib/solar_terms_24/db/2010.json +26 -0
  124. data/lib/solar_terms_24/db/2011.json +26 -0
  125. data/lib/solar_terms_24/db/2012.json +26 -0
  126. data/lib/solar_terms_24/db/2013.json +26 -0
  127. data/lib/solar_terms_24/db/2014.json +26 -0
  128. data/lib/solar_terms_24/db/2015.json +26 -0
  129. data/lib/solar_terms_24/db/2016.json +26 -0
  130. data/lib/solar_terms_24/db/2017.json +26 -0
  131. data/lib/solar_terms_24/db/2018.json +26 -0
  132. data/lib/solar_terms_24/db/2019.json +26 -0
  133. data/lib/solar_terms_24/db/2020.json +26 -0
  134. data/lib/solar_terms_24/db/2021.json +26 -0
  135. data/lib/solar_terms_24/db/2022.json +26 -0
  136. data/lib/solar_terms_24/db/2023.json +26 -0
  137. data/lib/solar_terms_24/db/2024.json +26 -0
  138. data/lib/solar_terms_24/db/2025.json +26 -0
  139. data/lib/solar_terms_24/db/2026.json +26 -0
  140. data/lib/solar_terms_24/db/2027.json +26 -0
  141. data/lib/solar_terms_24/db/2028.json +26 -0
  142. data/lib/solar_terms_24/db/2029.json +26 -0
  143. data/lib/solar_terms_24/db/2030.json +26 -0
  144. data/lib/solar_terms_24/db/2031.json +26 -0
  145. data/lib/solar_terms_24/db/2032.json +26 -0
  146. data/lib/solar_terms_24/db/2033.json +26 -0
  147. data/lib/solar_terms_24/db/2034.json +26 -0
  148. data/lib/solar_terms_24/db/2035.json +26 -0
  149. data/lib/solar_terms_24/db/2036.json +26 -0
  150. data/lib/solar_terms_24/db/2037.json +26 -0
  151. data/lib/solar_terms_24/db/2038.json +26 -0
  152. data/lib/solar_terms_24/db/2039.json +26 -0
  153. data/lib/solar_terms_24/db/2040.json +26 -0
  154. data/lib/solar_terms_24/db/2041.json +26 -0
  155. data/lib/solar_terms_24/db/2042.json +26 -0
  156. data/lib/solar_terms_24/db/2043.json +26 -0
  157. data/lib/solar_terms_24/db/2044.json +26 -0
  158. data/lib/solar_terms_24/db/2045.json +26 -0
  159. data/lib/solar_terms_24/db/2046.json +26 -0
  160. data/lib/solar_terms_24/db/2047.json +26 -0
  161. data/lib/solar_terms_24/db/2048.json +26 -0
  162. data/lib/solar_terms_24/db/2049.json +26 -0
  163. data/lib/solar_terms_24/db/2050.json +26 -0
  164. data/lib/solar_terms_24/db/2051.json +26 -0
  165. data/lib/solar_terms_24/db/2052.json +26 -0
  166. data/lib/solar_terms_24/db/2053.json +26 -0
  167. data/lib/solar_terms_24/db/2054.json +26 -0
  168. data/lib/solar_terms_24/db/2055.json +26 -0
  169. data/lib/solar_terms_24/db/2056.json +26 -0
  170. data/lib/solar_terms_24/db/2057.json +26 -0
  171. data/lib/solar_terms_24/db/2058.json +26 -0
  172. data/lib/solar_terms_24/db/2059.json +26 -0
  173. data/lib/solar_terms_24/db/2060.json +26 -0
  174. data/lib/solar_terms_24/db/2061.json +26 -0
  175. data/lib/solar_terms_24/db/2062.json +26 -0
  176. data/lib/solar_terms_24/db/2063.json +26 -0
  177. data/lib/solar_terms_24/db/2064.json +26 -0
  178. data/lib/solar_terms_24/db/2065.json +26 -0
  179. data/lib/solar_terms_24/db/2066.json +26 -0
  180. data/lib/solar_terms_24/db/2067.json +26 -0
  181. data/lib/solar_terms_24/db/2068.json +26 -0
  182. data/lib/solar_terms_24/db/2069.json +26 -0
  183. data/lib/solar_terms_24/db/2070.json +26 -0
  184. data/lib/solar_terms_24/db/2071.json +26 -0
  185. data/lib/solar_terms_24/db/2072.json +26 -0
  186. data/lib/solar_terms_24/db/2073.json +26 -0
  187. data/lib/solar_terms_24/db/2074.json +26 -0
  188. data/lib/solar_terms_24/db/2075.json +26 -0
  189. data/lib/solar_terms_24/db/2076.json +26 -0
  190. data/lib/solar_terms_24/db/2077.json +26 -0
  191. data/lib/solar_terms_24/db/2078.json +26 -0
  192. data/lib/solar_terms_24/db/2079.json +26 -0
  193. data/lib/solar_terms_24/db/2080.json +26 -0
  194. data/lib/solar_terms_24/db/2081.json +26 -0
  195. data/lib/solar_terms_24/db/2082.json +26 -0
  196. data/lib/solar_terms_24/db/2083.json +26 -0
  197. data/lib/solar_terms_24/db/2084.json +26 -0
  198. data/lib/solar_terms_24/db/2085.json +26 -0
  199. data/lib/solar_terms_24/db/2086.json +26 -0
  200. data/lib/solar_terms_24/db/2087.json +26 -0
  201. data/lib/solar_terms_24/db/2088.json +26 -0
  202. data/lib/solar_terms_24/db/2089.json +26 -0
  203. data/lib/solar_terms_24/db/2090.json +26 -0
  204. data/lib/solar_terms_24/db/2091.json +26 -0
  205. data/lib/solar_terms_24/db/2092.json +26 -0
  206. data/lib/solar_terms_24/db/2093.json +26 -0
  207. data/lib/solar_terms_24/db/2094.json +26 -0
  208. data/lib/solar_terms_24/db/2095.json +26 -0
  209. data/lib/solar_terms_24/db/2096.json +26 -0
  210. data/lib/solar_terms_24/db/2097.json +26 -0
  211. data/lib/solar_terms_24/db/2098.json +26 -0
  212. data/lib/solar_terms_24/db/2099.json +26 -0
  213. data/lib/solar_terms_24/db/2100.json +26 -0
  214. data/lib/solar_terms_24/horizons.rb +82 -0
  215. data/lib/solar_terms_24/locales/en.yml +25 -0
  216. data/lib/solar_terms_24/locales/ja.yml +25 -0
  217. data/lib/solar_terms_24/locales/ko.yml +25 -0
  218. data/lib/solar_terms_24/locales/vi.yml +25 -0
  219. data/lib/solar_terms_24/locales/zh-CN.yml +25 -0
  220. data/lib/solar_terms_24/locales/zh-TW.yml +25 -0
  221. data/lib/solar_terms_24/solar_term.rb +51 -0
  222. data/lib/solar_terms_24/solar_terms.rb +59 -0
  223. data/lib/solar_terms_24/version.rb +5 -0
  224. data/lib/solar_terms_24.rb +12 -0
  225. data/sig/horizons_solar_terms.rbs +4 -0
  226. metadata +382 -0
data/Timezones.md ADDED
@@ -0,0 +1,599 @@
1
+ ## Supported Timezones
2
+
3
+ * Africa/Abidjan
4
+ * Africa/Accra
5
+ * Africa/Addis_Ababa
6
+ * Africa/Algiers
7
+ * Africa/Asmara
8
+ * Africa/Asmera
9
+ * Africa/Bamako
10
+ * Africa/Bangui
11
+ * Africa/Banjul
12
+ * Africa/Bissau
13
+ * Africa/Blantyre
14
+ * Africa/Brazzaville
15
+ * Africa/Bujumbura
16
+ * Africa/Cairo
17
+ * Africa/Casablanca
18
+ * Africa/Ceuta
19
+ * Africa/Conakry
20
+ * Africa/Dakar
21
+ * Africa/Dar_es_Salaam
22
+ * Africa/Djibouti
23
+ * Africa/Douala
24
+ * Africa/El_Aaiun
25
+ * Africa/Freetown
26
+ * Africa/Gaborone
27
+ * Africa/Harare
28
+ * Africa/Johannesburg
29
+ * Africa/Juba
30
+ * Africa/Kampala
31
+ * Africa/Khartoum
32
+ * Africa/Kigali
33
+ * Africa/Kinshasa
34
+ * Africa/Lagos
35
+ * Africa/Libreville
36
+ * Africa/Lome
37
+ * Africa/Luanda
38
+ * Africa/Lubumbashi
39
+ * Africa/Lusaka
40
+ * Africa/Malabo
41
+ * Africa/Maputo
42
+ * Africa/Maseru
43
+ * Africa/Mbabane
44
+ * Africa/Mogadishu
45
+ * Africa/Monrovia
46
+ * Africa/Nairobi
47
+ * Africa/Ndjamena
48
+ * Africa/Niamey
49
+ * Africa/Nouakchott
50
+ * Africa/Ouagadougou
51
+ * Africa/Porto-Novo
52
+ * Africa/Sao_Tome
53
+ * Africa/Timbuktu
54
+ * Africa/Tripoli
55
+ * Africa/Tunis
56
+ * Africa/Windhoek
57
+ * America/Adak
58
+ * America/Anchorage
59
+ * America/Anguilla
60
+ * America/Antigua
61
+ * America/Araguaina
62
+ * America/Argentina/Buenos_Aires
63
+ * America/Argentina/Catamarca
64
+ * America/Argentina/ComodRivadavia
65
+ * America/Argentina/Cordoba
66
+ * America/Argentina/Jujuy
67
+ * America/Argentina/La_Rioja
68
+ * America/Argentina/Mendoza
69
+ * America/Argentina/Rio_Gallegos
70
+ * America/Argentina/Salta
71
+ * America/Argentina/San_Juan
72
+ * America/Argentina/San_Luis
73
+ * America/Argentina/Tucuman
74
+ * America/Argentina/Ushuaia
75
+ * America/Aruba
76
+ * America/Asuncion
77
+ * America/Atikokan
78
+ * America/Atka
79
+ * America/Bahia
80
+ * America/Bahia_Banderas
81
+ * America/Barbados
82
+ * America/Belem
83
+ * America/Belize
84
+ * America/Blanc-Sablon
85
+ * America/Boa_Vista
86
+ * America/Bogota
87
+ * America/Boise
88
+ * America/Buenos_Aires
89
+ * America/Cambridge_Bay
90
+ * America/Campo_Grande
91
+ * America/Cancun
92
+ * America/Caracas
93
+ * America/Catamarca
94
+ * America/Cayenne
95
+ * America/Cayman
96
+ * America/Chicago
97
+ * America/Chihuahua
98
+ * America/Ciudad_Juarez
99
+ * America/Coral_Harbour
100
+ * America/Cordoba
101
+ * America/Costa_Rica
102
+ * America/Creston
103
+ * America/Cuiaba
104
+ * America/Curacao
105
+ * America/Danmarkshavn
106
+ * America/Dawson
107
+ * America/Dawson_Creek
108
+ * America/Denver
109
+ * America/Detroit
110
+ * America/Dominica
111
+ * America/Edmonton
112
+ * America/Eirunepe
113
+ * America/El_Salvador
114
+ * America/Ensenada
115
+ * America/Fort_Nelson
116
+ * America/Fort_Wayne
117
+ * America/Fortaleza
118
+ * America/Glace_Bay
119
+ * America/Godthab
120
+ * America/Goose_Bay
121
+ * America/Grand_Turk
122
+ * America/Grenada
123
+ * America/Guadeloupe
124
+ * America/Guatemala
125
+ * America/Guayaquil
126
+ * America/Guyana
127
+ * America/Halifax
128
+ * America/Havana
129
+ * America/Hermosillo
130
+ * America/Indiana/Indianapolis
131
+ * America/Indiana/Knox
132
+ * America/Indiana/Marengo
133
+ * America/Indiana/Petersburg
134
+ * America/Indiana/Tell_City
135
+ * America/Indiana/Vevay
136
+ * America/Indiana/Vincennes
137
+ * America/Indiana/Winamac
138
+ * America/Indianapolis
139
+ * America/Inuvik
140
+ * America/Iqaluit
141
+ * America/Jamaica
142
+ * America/Jujuy
143
+ * America/Juneau
144
+ * America/Kentucky/Louisville
145
+ * America/Kentucky/Monticello
146
+ * America/Knox_IN
147
+ * America/Kralendijk
148
+ * America/La_Paz
149
+ * America/Lima
150
+ * America/Los_Angeles
151
+ * America/Louisville
152
+ * America/Lower_Princes
153
+ * America/Maceio
154
+ * America/Managua
155
+ * America/Manaus
156
+ * America/Marigot
157
+ * America/Martinique
158
+ * America/Matamoros
159
+ * America/Mazatlan
160
+ * America/Mendoza
161
+ * America/Menominee
162
+ * America/Merida
163
+ * America/Metlakatla
164
+ * America/Mexico_City
165
+ * America/Miquelon
166
+ * America/Moncton
167
+ * America/Monterrey
168
+ * America/Montevideo
169
+ * America/Montreal
170
+ * America/Montserrat
171
+ * America/Nassau
172
+ * America/New_York
173
+ * America/Nipigon
174
+ * America/Nome
175
+ * America/Noronha
176
+ * America/North_Dakota/Beulah
177
+ * America/North_Dakota/Center
178
+ * America/North_Dakota/New_Salem
179
+ * America/Nuuk
180
+ * America/Ojinaga
181
+ * America/Panama
182
+ * America/Pangnirtung
183
+ * America/Paramaribo
184
+ * America/Phoenix
185
+ * America/Port-au-Prince
186
+ * America/Port_of_Spain
187
+ * America/Porto_Acre
188
+ * America/Porto_Velho
189
+ * America/Puerto_Rico
190
+ * America/Punta_Arenas
191
+ * America/Rainy_River
192
+ * America/Rankin_Inlet
193
+ * America/Recife
194
+ * America/Regina
195
+ * America/Resolute
196
+ * America/Rio_Branco
197
+ * America/Rosario
198
+ * America/Santa_Isabel
199
+ * America/Santarem
200
+ * America/Santiago
201
+ * America/Santo_Domingo
202
+ * America/Sao_Paulo
203
+ * America/Scoresbysund
204
+ * America/Shiprock
205
+ * America/Sitka
206
+ * America/St_Barthelemy
207
+ * America/St_Johns
208
+ * America/St_Kitts
209
+ * America/St_Lucia
210
+ * America/St_Thomas
211
+ * America/St_Vincent
212
+ * America/Swift_Current
213
+ * America/Tegucigalpa
214
+ * America/Thule
215
+ * America/Thunder_Bay
216
+ * America/Tijuana
217
+ * America/Toronto
218
+ * America/Tortola
219
+ * America/Vancouver
220
+ * America/Virgin
221
+ * America/Whitehorse
222
+ * America/Winnipeg
223
+ * America/Yakutat
224
+ * America/Yellowknife
225
+ * Antarctica/Casey
226
+ * Antarctica/Davis
227
+ * Antarctica/DumontDUrville
228
+ * Antarctica/Macquarie
229
+ * Antarctica/Mawson
230
+ * Antarctica/McMurdo
231
+ * Antarctica/Palmer
232
+ * Antarctica/Rothera
233
+ * Antarctica/South_Pole
234
+ * Antarctica/Syowa
235
+ * Antarctica/Troll
236
+ * Antarctica/Vostok
237
+ * Arctic/Longyearbyen
238
+ * Asia/Aden
239
+ * Asia/Almaty
240
+ * Asia/Amman
241
+ * Asia/Anadyr
242
+ * Asia/Aqtau
243
+ * Asia/Aqtobe
244
+ * Asia/Ashgabat
245
+ * Asia/Ashkhabad
246
+ * Asia/Atyrau
247
+ * Asia/Baghdad
248
+ * Asia/Bahrain
249
+ * Asia/Baku
250
+ * Asia/Bangkok
251
+ * Asia/Barnaul
252
+ * Asia/Beirut
253
+ * Asia/Bishkek
254
+ * Asia/Brunei
255
+ * Asia/Calcutta
256
+ * Asia/Chita
257
+ * Asia/Choibalsan
258
+ * Asia/Chongqing
259
+ * Asia/Chungking
260
+ * Asia/Colombo
261
+ * Asia/Dacca
262
+ * Asia/Damascus
263
+ * Asia/Dhaka
264
+ * Asia/Dili
265
+ * Asia/Dubai
266
+ * Asia/Dushanbe
267
+ * Asia/Famagusta
268
+ * Asia/Gaza
269
+ * Asia/Harbin
270
+ * Asia/Hebron
271
+ * Asia/Ho_Chi_Minh
272
+ * Asia/Hong_Kong
273
+ * Asia/Hovd
274
+ * Asia/Irkutsk
275
+ * Asia/Istanbul
276
+ * Asia/Jakarta
277
+ * Asia/Jayapura
278
+ * Asia/Jerusalem
279
+ * Asia/Kabul
280
+ * Asia/Kamchatka
281
+ * Asia/Karachi
282
+ * Asia/Kashgar
283
+ * Asia/Kathmandu
284
+ * Asia/Katmandu
285
+ * Asia/Khandyga
286
+ * Asia/Kolkata
287
+ * Asia/Krasnoyarsk
288
+ * Asia/Kuala_Lumpur
289
+ * Asia/Kuching
290
+ * Asia/Kuwait
291
+ * Asia/Macao
292
+ * Asia/Macau
293
+ * Asia/Magadan
294
+ * Asia/Makassar
295
+ * Asia/Manila
296
+ * Asia/Muscat
297
+ * Asia/Nicosia
298
+ * Asia/Novokuznetsk
299
+ * Asia/Novosibirsk
300
+ * Asia/Omsk
301
+ * Asia/Oral
302
+ * Asia/Phnom_Penh
303
+ * Asia/Pontianak
304
+ * Asia/Pyongyang
305
+ * Asia/Qatar
306
+ * Asia/Qostanay
307
+ * Asia/Qyzylorda
308
+ * Asia/Rangoon
309
+ * Asia/Riyadh
310
+ * Asia/Saigon
311
+ * Asia/Sakhalin
312
+ * Asia/Samarkand
313
+ * Asia/Seoul
314
+ * Asia/Shanghai
315
+ * Asia/Singapore
316
+ * Asia/Srednekolymsk
317
+ * Asia/Taipei
318
+ * Asia/Tashkent
319
+ * Asia/Tbilisi
320
+ * Asia/Tehran
321
+ * Asia/Tel_Aviv
322
+ * Asia/Thimbu
323
+ * Asia/Thimphu
324
+ * Asia/Tokyo
325
+ * Asia/Tomsk
326
+ * Asia/Ujung_Pandang
327
+ * Asia/Ulaanbaatar
328
+ * Asia/Ulan_Bator
329
+ * Asia/Urumqi
330
+ * Asia/Ust-Nera
331
+ * Asia/Vientiane
332
+ * Asia/Vladivostok
333
+ * Asia/Yakutsk
334
+ * Asia/Yangon
335
+ * Asia/Yekaterinburg
336
+ * Asia/Yerevan
337
+ * Atlantic/Azores
338
+ * Atlantic/Bermuda
339
+ * Atlantic/Canary
340
+ * Atlantic/Cape_Verde
341
+ * Atlantic/Faeroe
342
+ * Atlantic/Faroe
343
+ * Atlantic/Jan_Mayen
344
+ * Atlantic/Madeira
345
+ * Atlantic/Reykjavik
346
+ * Atlantic/South_Georgia
347
+ * Atlantic/St_Helena
348
+ * Atlantic/Stanley
349
+ * Australia/ACT
350
+ * Australia/Adelaide
351
+ * Australia/Brisbane
352
+ * Australia/Broken_Hill
353
+ * Australia/Canberra
354
+ * Australia/Currie
355
+ * Australia/Darwin
356
+ * Australia/Eucla
357
+ * Australia/Hobart
358
+ * Australia/LHI
359
+ * Australia/Lindeman
360
+ * Australia/Lord_Howe
361
+ * Australia/Melbourne
362
+ * Australia/NSW
363
+ * Australia/North
364
+ * Australia/Perth
365
+ * Australia/Queensland
366
+ * Australia/South
367
+ * Australia/Sydney
368
+ * Australia/Tasmania
369
+ * Australia/Victoria
370
+ * Australia/West
371
+ * Australia/Yancowinna
372
+ * Brazil/Acre
373
+ * Brazil/DeNoronha
374
+ * Brazil/East
375
+ * Brazil/West
376
+ * CET
377
+ * CST6CDT
378
+ * Canada/Atlantic
379
+ * Canada/Central
380
+ * Canada/Eastern
381
+ * Canada/Mountain
382
+ * Canada/Newfoundland
383
+ * Canada/Pacific
384
+ * Canada/Saskatchewan
385
+ * Canada/Yukon
386
+ * Chile/Continental
387
+ * Chile/EasterIsland
388
+ * Cuba
389
+ * EET
390
+ * EST
391
+ * EST5EDT
392
+ * Egypt
393
+ * Eire
394
+ * Etc/GMT
395
+ * Etc/GMT+0
396
+ * Etc/GMT+1
397
+ * Etc/GMT+10
398
+ * Etc/GMT+11
399
+ * Etc/GMT+12
400
+ * Etc/GMT+2
401
+ * Etc/GMT+3
402
+ * Etc/GMT+4
403
+ * Etc/GMT+5
404
+ * Etc/GMT+6
405
+ * Etc/GMT+7
406
+ * Etc/GMT+8
407
+ * Etc/GMT+9
408
+ * Etc/GMT-0
409
+ * Etc/GMT-1
410
+ * Etc/GMT-10
411
+ * Etc/GMT-11
412
+ * Etc/GMT-12
413
+ * Etc/GMT-13
414
+ * Etc/GMT-14
415
+ * Etc/GMT-2
416
+ * Etc/GMT-3
417
+ * Etc/GMT-4
418
+ * Etc/GMT-5
419
+ * Etc/GMT-6
420
+ * Etc/GMT-7
421
+ * Etc/GMT-8
422
+ * Etc/GMT-9
423
+ * Etc/GMT0
424
+ * Etc/Greenwich
425
+ * Etc/UCT
426
+ * Etc/UTC
427
+ * Etc/Universal
428
+ * Etc/Zulu
429
+ * Europe/Amsterdam
430
+ * Europe/Andorra
431
+ * Europe/Astrakhan
432
+ * Europe/Athens
433
+ * Europe/Belfast
434
+ * Europe/Belgrade
435
+ * Europe/Berlin
436
+ * Europe/Bratislava
437
+ * Europe/Brussels
438
+ * Europe/Bucharest
439
+ * Europe/Budapest
440
+ * Europe/Busingen
441
+ * Europe/Chisinau
442
+ * Europe/Copenhagen
443
+ * Europe/Dublin
444
+ * Europe/Gibraltar
445
+ * Europe/Guernsey
446
+ * Europe/Helsinki
447
+ * Europe/Isle_of_Man
448
+ * Europe/Istanbul
449
+ * Europe/Jersey
450
+ * Europe/Kaliningrad
451
+ * Europe/Kiev
452
+ * Europe/Kirov
453
+ * Europe/Kyiv
454
+ * Europe/Lisbon
455
+ * Europe/Ljubljana
456
+ * Europe/London
457
+ * Europe/Luxembourg
458
+ * Europe/Madrid
459
+ * Europe/Malta
460
+ * Europe/Mariehamn
461
+ * Europe/Minsk
462
+ * Europe/Monaco
463
+ * Europe/Moscow
464
+ * Europe/Nicosia
465
+ * Europe/Oslo
466
+ * Europe/Paris
467
+ * Europe/Podgorica
468
+ * Europe/Prague
469
+ * Europe/Riga
470
+ * Europe/Rome
471
+ * Europe/Samara
472
+ * Europe/San_Marino
473
+ * Europe/Sarajevo
474
+ * Europe/Saratov
475
+ * Europe/Simferopol
476
+ * Europe/Skopje
477
+ * Europe/Sofia
478
+ * Europe/Stockholm
479
+ * Europe/Tallinn
480
+ * Europe/Tirane
481
+ * Europe/Tiraspol
482
+ * Europe/Ulyanovsk
483
+ * Europe/Uzhgorod
484
+ * Europe/Vaduz
485
+ * Europe/Vatican
486
+ * Europe/Vienna
487
+ * Europe/Vilnius
488
+ * Europe/Volgograd
489
+ * Europe/Warsaw
490
+ * Europe/Zagreb
491
+ * Europe/Zaporozhye
492
+ * Europe/Zurich
493
+ * Factory
494
+ * GB
495
+ * GB-Eire
496
+ * GMT
497
+ * GMT+0
498
+ * GMT-0
499
+ * GMT0
500
+ * Greenwich
501
+ * HST
502
+ * Hongkong
503
+ * Iceland
504
+ * Indian/Antananarivo
505
+ * Indian/Chagos
506
+ * Indian/Christmas
507
+ * Indian/Cocos
508
+ * Indian/Comoro
509
+ * Indian/Kerguelen
510
+ * Indian/Mahe
511
+ * Indian/Maldives
512
+ * Indian/Mauritius
513
+ * Indian/Mayotte
514
+ * Indian/Reunion
515
+ * Iran
516
+ * Israel
517
+ * Jamaica
518
+ * Japan
519
+ * Kwajalein
520
+ * Libya
521
+ * MET
522
+ * MST
523
+ * MST7MDT
524
+ * Mexico/BajaNorte
525
+ * Mexico/BajaSur
526
+ * Mexico/General
527
+ * NZ
528
+ * NZ-CHAT
529
+ * Navajo
530
+ * PRC
531
+ * PST8PDT
532
+ * Pacific/Apia
533
+ * Pacific/Auckland
534
+ * Pacific/Bougainville
535
+ * Pacific/Chatham
536
+ * Pacific/Chuuk
537
+ * Pacific/Easter
538
+ * Pacific/Efate
539
+ * Pacific/Enderbury
540
+ * Pacific/Fakaofo
541
+ * Pacific/Fiji
542
+ * Pacific/Funafuti
543
+ * Pacific/Galapagos
544
+ * Pacific/Gambier
545
+ * Pacific/Guadalcanal
546
+ * Pacific/Guam
547
+ * Pacific/Honolulu
548
+ * Pacific/Johnston
549
+ * Pacific/Kanton
550
+ * Pacific/Kiritimati
551
+ * Pacific/Kosrae
552
+ * Pacific/Kwajalein
553
+ * Pacific/Majuro
554
+ * Pacific/Marquesas
555
+ * Pacific/Midway
556
+ * Pacific/Nauru
557
+ * Pacific/Niue
558
+ * Pacific/Norfolk
559
+ * Pacific/Noumea
560
+ * Pacific/Pago_Pago
561
+ * Pacific/Palau
562
+ * Pacific/Pitcairn
563
+ * Pacific/Pohnpei
564
+ * Pacific/Ponape
565
+ * Pacific/Port_Moresby
566
+ * Pacific/Rarotonga
567
+ * Pacific/Saipan
568
+ * Pacific/Samoa
569
+ * Pacific/Tahiti
570
+ * Pacific/Tarawa
571
+ * Pacific/Tongatapu
572
+ * Pacific/Truk
573
+ * Pacific/Wake
574
+ * Pacific/Wallis
575
+ * Pacific/Yap
576
+ * Poland
577
+ * Portugal
578
+ * ROC
579
+ * ROK
580
+ * Singapore
581
+ * Turkey
582
+ * UCT
583
+ * US/Alaska
584
+ * US/Aleutian
585
+ * US/Arizona
586
+ * US/Central
587
+ * US/East-Indiana
588
+ * US/Eastern
589
+ * US/Hawaii
590
+ * US/Indiana-Starke
591
+ * US/Michigan
592
+ * US/Mountain
593
+ * US/Pacific
594
+ * US/Samoa
595
+ * UTC
596
+ * Universal
597
+ * W-SU
598
+ * WET
599
+ * Zulu
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'solar_terms_24'
5
+
6
+ SolarTerms24::Cli.start(ARGV)
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'json'
4
+
5
+ module SolarTerms24
6
+ # :nodoc:
7
+ class Cache
8
+ TIME_FORMAT = '%Y-%m-%d %H:%M:%S.%L%:z'
9
+ CACHE_DIR = File.expand_path(File.join(__dir__, 'db'))
10
+
11
+ def self.has?(year)
12
+ File.exist?("#{CACHE_DIR}/#{year}.json")
13
+ end
14
+
15
+ def self.load(year)
16
+ file = File.read("#{CACHE_DIR}/#{year}.json")
17
+ JSON.parse(file, symbolize_names: true).tap do |json|
18
+ json.each_key do |key|
19
+ json[key] = DateTime.parse(json[key])
20
+ end
21
+ end
22
+ end
23
+
24
+ def self.save(year, data)
25
+ File.open("#{CACHE_DIR}/#{year}.json", 'w') do |f|
26
+ json = data.dup
27
+ json.each_key do |key|
28
+ json[key] = json[key].strftime(TIME_FORMAT)
29
+ end
30
+ f.write(JSON.pretty_generate(json))
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ module SolarTerms24
6
+ # :nodoc:
7
+ class Cli < Thor
8
+ desc 'list YEAR', 'List the 24 solar terms for the given year'
9
+ option :lang, type: :string, default: 'en', desc: 'Language: en, zh-TW, or ja'
10
+ option :timezone, type: :string, default: 'UTC', desc: 'Timezone: UTC, Asia/Taipei, Asia/Tokyo, etc.'
11
+ def list(year)
12
+ solar_terms = SolarTerms.new(year, timezone: options[:timezone], lang: options[:lang])
13
+ solar_terms.solar_terms.each_value do |solar_term|
14
+ puts "#{solar_term.name}: #{solar_term.datetime.strftime("%Y-%m-%d %H:%M")}"
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,26 @@
1
+ {
2
+ "minor_cold": "1900-01-05 18:04:02.494+00:00",
3
+ "major_cold": "1900-01-20 11:32:29.605+00:00",
4
+ "start_of_spring": "1900-02-04 05:51:35.234+00:00",
5
+ "spring_showers": "1900-02-19 02:01:18.701+00:00",
6
+ "awakening_of_insects": "1900-03-06 00:21:55.825+00:00",
7
+ "spring_equinox": "1900-03-21 01:39:05.710+00:00",
8
+ "pure_brightness": "1900-04-05 05:52:45.110+00:00",
9
+ "grain_rain": "1900-04-20 13:27:11.496+00:00",
10
+ "start_of_summer": "1900-05-05 23:55:16.911+00:00",
11
+ "grain_buds": "1900-05-21 13:17:01.069+00:00",
12
+ "grain_in_ear": "1900-06-06 04:39:01.195+00:00",
13
+ "summer_solstice": "1900-06-21 21:39:51.677+00:00",
14
+ "minor_heat": "1900-07-07 15:10:14.562+00:00",
15
+ "major_heat": "1900-07-23 08:36:12.842+00:00",
16
+ "start_of_autumn": "1900-08-08 00:50:39.666+00:00",
17
+ "end_of_heat": "1900-08-23 15:19:54.435+00:00",
18
+ "white_dew": "1900-09-08 03:16:42.895+00:00",
19
+ "autumn_equinox": "1900-09-23 12:20:15.540+00:00",
20
+ "cold_dew": "1900-10-08 18:13:13.479+00:00",
21
+ "frost": "1900-10-23 20:55:20.915+00:00",
22
+ "start_of_winter": "1900-11-07 20:39:48.574+00:00",
23
+ "minor_snow": "1900-11-22 17:47:55.141+00:00",
24
+ "major_snow": "1900-12-07 12:55:55.631+00:00",
25
+ "winter_solstice": "1900-12-22 06:41:38.514+00:00"
26
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "minor_cold": "1901-01-05 23:53:27.683+00:00",
3
+ "major_cold": "1901-01-20 17:16:31.641+00:00",
4
+ "start_of_spring": "1901-02-04 11:39:56.166+00:00",
5
+ "spring_showers": "1901-02-19 07:44:58.573+00:00",
6
+ "awakening_of_insects": "1901-03-06 06:10:56.872+00:00",
7
+ "spring_equinox": "1901-03-21 07:23:39.378+00:00",
8
+ "pure_brightness": "1901-04-05 11:44:25.559+00:00",
9
+ "grain_rain": "1901-04-20 19:13:29.969+00:00",
10
+ "start_of_summer": "1901-05-06 05:50:28.412+00:00",
11
+ "grain_buds": "1901-05-21 19:04:44.489+00:00",
12
+ "grain_in_ear": "1901-06-06 10:36:32.195+00:00",
13
+ "summer_solstice": "1901-06-22 03:27:52.323+00:00",
14
+ "minor_heat": "1901-07-07 21:07:39.748+00:00",
15
+ "major_heat": "1901-07-23 14:23:51.454+00:00",
16
+ "start_of_autumn": "1901-08-08 06:46:11.244+00:00",
17
+ "end_of_heat": "1901-08-23 21:07:33.744+00:00",
18
+ "white_dew": "1901-09-08 09:10:19.830+00:00",
19
+ "autumn_equinox": "1901-09-23 18:09:00.512+00:00",
20
+ "cold_dew": "1901-10-09 00:06:32.675+00:00",
21
+ "frost": "1901-10-24 02:46:18.358+00:00",
22
+ "start_of_winter": "1901-11-08 02:34:35.065+00:00",
23
+ "minor_snow": "1901-11-22 23:41:18.162+00:00",
24
+ "major_snow": "1901-12-07 18:52:43.321+00:00",
25
+ "winter_solstice": "1901-12-22 12:36:40.612+00:00"
26
+ }