when_exe 0.3.9 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +212 -210
- data/lib/when_exe.rb +14 -12
- data/lib/when_exe/coordinates.rb +11 -9
- data/lib/when_exe/ephemeris.rb +5 -0
- data/lib/when_exe/locales/transliteration_table.rb +1 -1
- data/lib/when_exe/parts/resource.rb +1103 -1101
- data/lib/when_exe/region/chinese.rb +36 -40
- data/lib/when_exe/region/chinese/epochs.rb +86 -81
- data/lib/when_exe/region/chinese/twins.rb +16 -16
- data/lib/when_exe/region/japanese.rb +12 -12
- data/lib/when_exe/region/japanese/calendars.rb +1 -0
- data/lib/when_exe/region/japanese/notes.rb +14 -1
- data/lib/when_exe/region/javanese.rb +2 -2
- data/lib/when_exe/region/ryukyu.rb +12 -10
- data/lib/when_exe/version.rb +1 -1
- data/link_to_online_documents +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61a3f8c00d80359403cc75825c11f1945bce2c28
|
4
|
+
data.tar.gz: ebe31639b5e037a4ffba17a75005e7136b0827b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe803b369afa1fd2ab944705c2ad4a766b687491759dd18474cfd0239f344a8d30bb8fdff2207881d5f04762d2c02d73d0615fbdc8eb549cd27c0bb200ef1929
|
7
|
+
data.tar.gz: 67420672b88943d9247dba224d996eca6474220bf6f508b60ed9449f9164407a09e37f97596ac305873085e5c4a13a0d261acb8e4a2740bd706c00450f128154
|
data/README.md
CHANGED
@@ -1,210 +1,212 @@
|
|
1
|
-
when_exe - A multicultural and multilingualized calendar library
|
2
|
-
================================================================
|
3
|
-
|
4
|
-
[](http://badge.fury.io/rb/when_exe)
|
5
|
-
|
6
|
-
[when_exe](http://rubygems.org/gems/when_exe) is a multicultural and multilingualized calendar library based on [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601), [ISO 19108](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=26013), [RFC 5545(iCalendar)](http://tools.ietf.org/html/rfc5545) and [RFC6350](http://tools.ietf.org/html/rfc6350).
|
7
|
-
|
8
|
-
[<img alt='Architecture' title='display this figure at actual size' src='https://raw.githubusercontent.com/suchowan/when_exe/f7bb8b51259f0c1653c6c37b3ce20bd2a6ab7914/architecture.png' width='637' height='408'/>](https://raw.githubusercontent.com/suchowan/when_exe/f7bb8b51259f0c1653c6c37b3ce20bd2a6ab7914/architecture.png)
|
9
|
-
|
10
|
-
Installation
|
11
|
-
------------
|
12
|
-
|
13
|
-
The when_exe gem can be installed by running:
|
14
|
-
|
15
|
-
gem install when_exe
|
16
|
-
|
17
|
-
|
18
|
-
Web Server
|
19
|
-
----------
|
20
|
-
|
21
|
-
Web server for when_exe demonstration is available on [hosi.org](http://hosi.org).
|
22
|
-
|
23
|
-
You can see examples of [When.exe Standard Representation](http://www.asahi-net.or.jp/~dd6t-sg/when_rdoc/when_en.html#label-8) and Reference System IRI at the top-left corner of Date frame.
|
24
|
-
|
25
|
-
Preferences are changeable on [hosi.org/cookies](http://hosi.org/cookies).
|
26
|
-
|
27
|
-
|
28
|
-
Documentation
|
29
|
-
-------------
|
30
|
-
|
31
|
-
API documentation for when_exe is available on [RubyDoc.info](http://rubydoc.info/gems/when_exe).
|
32
|
-
|
33
|
-
Available calendars and clocks are defined as subclasses of TM_Calendar and TM_Clock or using definition tables in [CalendarTypes namespace](http://rubydoc.info/gems/when_exe/When/CalendarTypes).
|
34
|
-
|
35
|
-
Available calendar eras are defined using definition tables in [CalendarEra namespace](http://rubydoc.info/gems/when_exe/When/TM/CalendarEra).
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
p gregorian_date
|
60
|
-
p
|
61
|
-
p gregorian_date.
|
62
|
-
p gregorian_date.
|
63
|
-
|
64
|
-
|
65
|
-
puts gregorian_date.name(When::MONTH)
|
66
|
-
puts gregorian_date.name(When::MONTH) /
|
67
|
-
puts gregorian_date.name(When::MONTH) / '
|
68
|
-
|
69
|
-
|
70
|
-
p
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
p When.
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
p gregorian_date
|
87
|
-
p
|
88
|
-
p gregorian_date.
|
89
|
-
p gregorian_date.
|
90
|
-
p gregorian_date.
|
91
|
-
p gregorian_date.
|
92
|
-
|
93
|
-
gregorian_date
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
p gregorian_date
|
98
|
-
p gregorian_date.
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
p darian_date
|
104
|
-
p darian_date.
|
105
|
-
p darian_date.
|
106
|
-
p darian_date.
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
p babylonian_date
|
114
|
-
p When.
|
115
|
-
p
|
116
|
-
p
|
117
|
-
p
|
118
|
-
p babylonian_date.
|
119
|
-
|
120
|
-
babylonian_date
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
# [NebuchadnezzarII01(-603).01.
|
127
|
-
# [NebuchadnezzarII01(-603).01.
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
#
|
139
|
-
# "
|
140
|
-
# "
|
141
|
-
# "
|
142
|
-
#
|
143
|
-
# "
|
144
|
-
#
|
145
|
-
# "
|
146
|
-
# "
|
147
|
-
# "
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
#
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
p gregorian_date
|
158
|
-
p gregorian_date.
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
p
|
164
|
-
|
165
|
-
p
|
166
|
-
|
167
|
-
p
|
168
|
-
|
169
|
-
p
|
170
|
-
|
171
|
-
p When.when?('TZID=America/New_York:1997-10-
|
172
|
-
p When.when?('TZID=America/New_York:1997-10-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
#
|
177
|
-
#
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
# 2014-01-
|
190
|
-
# 2014-01-
|
191
|
-
# 2014-
|
192
|
-
# 2014-
|
193
|
-
# 2014-
|
194
|
-
# 2014-
|
195
|
-
# 2014-
|
196
|
-
# 2014-05-
|
197
|
-
# 2014-05-
|
198
|
-
# 2014-
|
199
|
-
# 2014-
|
200
|
-
# 2014-
|
201
|
-
# 2014-
|
202
|
-
# 2014-
|
203
|
-
# 2014-
|
204
|
-
# 2014-11-
|
205
|
-
# 2014-
|
206
|
-
# 2014-
|
207
|
-
# 2014-12-
|
208
|
-
|
209
|
-
|
210
|
-
|
1
|
+
when_exe - A multicultural and multilingualized calendar library
|
2
|
+
================================================================
|
3
|
+
|
4
|
+
[](http://badge.fury.io/rb/when_exe)
|
5
|
+
|
6
|
+
[when_exe](http://rubygems.org/gems/when_exe) is a multicultural and multilingualized calendar library based on [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601), [ISO 19108](http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=26013), [RFC 5545(iCalendar)](http://tools.ietf.org/html/rfc5545) and [RFC6350](http://tools.ietf.org/html/rfc6350).
|
7
|
+
|
8
|
+
[<img alt='Architecture' title='display this figure at actual size' src='https://raw.githubusercontent.com/suchowan/when_exe/f7bb8b51259f0c1653c6c37b3ce20bd2a6ab7914/architecture.png' width='637' height='408'/>](https://raw.githubusercontent.com/suchowan/when_exe/f7bb8b51259f0c1653c6c37b3ce20bd2a6ab7914/architecture.png)
|
9
|
+
|
10
|
+
Installation
|
11
|
+
------------
|
12
|
+
|
13
|
+
The when_exe gem can be installed by running:
|
14
|
+
|
15
|
+
gem install when_exe
|
16
|
+
|
17
|
+
|
18
|
+
Web Server
|
19
|
+
----------
|
20
|
+
|
21
|
+
Web server for when_exe demonstration is available on [hosi.org](http://hosi.org).
|
22
|
+
|
23
|
+
You can see examples of [When.exe Standard Representation](http://www.asahi-net.or.jp/~dd6t-sg/when_rdoc/when_en.html#label-8) and Reference System IRI at the top-left corner of Date frame.
|
24
|
+
|
25
|
+
Preferences are changeable on [hosi.org/cookies](http://hosi.org/cookies).
|
26
|
+
|
27
|
+
|
28
|
+
Documentation
|
29
|
+
-------------
|
30
|
+
|
31
|
+
API documentation for when_exe is available on [RubyDoc.info](http://rubydoc.info/gems/when_exe).
|
32
|
+
|
33
|
+
Available calendars and clocks are defined as subclasses of TM_Calendar and TM_Clock or using definition tables in [CalendarTypes namespace](http://rubydoc.info/gems/when_exe/When/CalendarTypes).
|
34
|
+
|
35
|
+
Available calendar eras are defined using definition tables in [CalendarEra namespace](http://rubydoc.info/gems/when_exe/When/TM/CalendarEra).
|
36
|
+
|
37
|
+
Whole TemporalReferenceSystem resources are listed in the [Resource Dictionary](http://www2u.biglobe.ne.jp/~suchowan/ResourceDictionary.html).
|
38
|
+
|
39
|
+
License
|
40
|
+
-------
|
41
|
+
|
42
|
+
This beta version's license is limited. Please see [LICENSE.txt](https://github.com/suchowan/when_exe/blob/master/LICENSE.txt) for details.
|
43
|
+
|
44
|
+
|
45
|
+
Source Code
|
46
|
+
-----------
|
47
|
+
|
48
|
+
Source code for when_exe is available on [GitHub](https://github.com/suchowan/when_exe).
|
49
|
+
|
50
|
+
|
51
|
+
Example Usage
|
52
|
+
-------------
|
53
|
+
|
54
|
+
require 'when_exe'
|
55
|
+
|
56
|
+
# When::TM::CalDate ---------------------------
|
57
|
+
|
58
|
+
gregorian_date = When.tm_pos(2014, 8, 1)
|
59
|
+
p gregorian_date #=> 2014-08-01
|
60
|
+
p When.when?('2014-08-01') #=> 2014-08-01, the same date
|
61
|
+
p gregorian_date.to_i #=> 2456871, Julian Day Number(Integer)
|
62
|
+
p gregorian_date.to_f #=> 2456871.0, at noon for UTC
|
63
|
+
p gregorian_date.class #=> When::TM::CalDate
|
64
|
+
p gregorian_date.frame.iri #=> "http://hosi.org/When/CalendarTypes/Gregorian"
|
65
|
+
puts gregorian_date.name(When::MONTH).class #=> When::BasicTypes::M17n
|
66
|
+
puts gregorian_date.name(When::MONTH).iri #=> http://hosi.org/When/BasicTypes/M17n/Calendar::Month::August
|
67
|
+
puts gregorian_date.name(When::MONTH) / 'en' #=> August
|
68
|
+
puts gregorian_date.name(When::MONTH) / 'fr' #=> août
|
69
|
+
puts gregorian_date.name(When::MONTH) / 'ar' #=> اغسطس
|
70
|
+
p gregorian_date.easter #=> 2014-04-20
|
71
|
+
p gregorian_date.is?('Easter') #=> false
|
72
|
+
p When.tm_pos(2014, 4, 20).is?('Easter') #=> true
|
73
|
+
|
74
|
+
islamic_date = When::TabularIslamic ^ gregorian_date
|
75
|
+
p islamic_date #=> 1435-10-04
|
76
|
+
p When.tm_pos(1435, 10, 4, :frame=>'TabularIslamic')
|
77
|
+
#=> 1435-10-04, the same date
|
78
|
+
p When.when?('1435-10-4^TabularIslamic') #=> 1435-10-04, the same date
|
79
|
+
p islamic_date.frame.iri #=> "http://hosi.org/When/CalendarTypes/TabularIslamic"
|
80
|
+
puts islamic_date.name(When::MONTH) / 'en' #=> Shawwal
|
81
|
+
puts islamic_date.name(When::MONTH) / 'ar' #=> شوال
|
82
|
+
|
83
|
+
# When::TM::DateAndTime ------------------------
|
84
|
+
|
85
|
+
gregorian_date = When.tm_pos(2014, 8, 1, 9, 0, 0, :clock=>'+09:00')
|
86
|
+
p gregorian_date #=> 2014-08-01T09:00:00+09:00
|
87
|
+
p When.when?('2014-08-01T09:00:00+09:00') #=> 2014-08-01T09:00:00+09:00, the same date
|
88
|
+
p gregorian_date.to_i #=> 2456871, Julian Day Number(Integer)
|
89
|
+
p gregorian_date.to_f #=> 2456870.5 at 09:00:00 of Timezone +09:00
|
90
|
+
p gregorian_date.class #=> When::TM::DateAndTime
|
91
|
+
p gregorian_date.frame.iri #=> "http://hosi.org/When/CalendarTypes/Gregorian"
|
92
|
+
p gregorian_date.clk_time.class #=> When::TM::ClockTime
|
93
|
+
p gregorian_date.clk_time.frame.iri #=> "http://hosi.org/When/TM/Clock?label=+09:00"
|
94
|
+
|
95
|
+
gregorian_date = When.tm_pos(2014, 8, 1, 9, 0, 0, :clock=>'+09:00',
|
96
|
+
:long=>'139.413012E', :lat=>'35.412222N')
|
97
|
+
p gregorian_date #=> 2014-08-01T09:00:00+09:00
|
98
|
+
p gregorian_date.location.iri #=> "http://hosi.org/When/Coordinates/Spatial?long=139.413012E&lat=35.412222N&alt=0"
|
99
|
+
p gregorian_date.sunrise.floor(When::MINUTE) #=> 2014-08-01T04:48+09:00
|
100
|
+
p gregorian_date.sunset.floor(When::MINUTE) #=> 2014-08-01T18:46+09:00
|
101
|
+
|
102
|
+
darian_date = When::Darian ^ gregorian_date
|
103
|
+
p darian_date #=> 0216-13-23T15:12:11MTC
|
104
|
+
p darian_date.to_i #=> 49974, Serial Day Number(Integer)
|
105
|
+
p darian_date.to_f #=> 49974.13346485421
|
106
|
+
p darian_date.frame.iri #=> "http://hosi.org/When/CalendarTypes/Darian"
|
107
|
+
p darian_date.clk_time.frame.iri #=> "http://hosi.org/When/CalendarTypes/MTC"
|
108
|
+
p darian_date.time_standard.iri #=> "http://hosi.org/When/TimeStandard/MartianTimeCoordinated?location=(_l:long=0&datum=Mars)"
|
109
|
+
|
110
|
+
# When::TM::CalendarEra ------------------------
|
111
|
+
|
112
|
+
babylonian_date = When.tm_pos('NebuchadnezzarII', 1, 1, 1)
|
113
|
+
p babylonian_date #=> NebuchadnezzarII01(-603).01.01
|
114
|
+
p When.when?('NebuchadnezzarII1.1.1') #=> NebuchadnezzarII01(-603).01.01, the same date
|
115
|
+
p babylonian_date.to_i #=> 1500904, Julian Day Number(Integer)
|
116
|
+
p When.era('NebuchadnezzarII') #=> [_e:AncientOrient::Neo-Babylonian::NebuchadnezzarII]
|
117
|
+
p When.era('NebuchadnezzarII')[0] ^ 1500904 #=> NebuchadnezzarII01(-603).01.01, the same date
|
118
|
+
p babylonian_date.to_f #=> 1500904.0, at noon for UTC
|
119
|
+
p babylonian_date.frame.iri #=> "http://hosi.org/When/CalendarTypes/BabylonianPD"
|
120
|
+
p babylonian_date.calendar_era.iri #=> "http://hosi.org/When/TM/CalendarEra/AncientOrient::Neo-Babylonian::NebuchadnezzarII"
|
121
|
+
|
122
|
+
babylonian_date = When.when?('NebuchadnezzarII1.1.1T18:13:00',
|
123
|
+
:clock=>'+03:00?long=45&lat=32&border=Sunset')
|
124
|
+
4.times do
|
125
|
+
p [babylonian_date, babylonian_date.to_i] #=>
|
126
|
+
# [NebuchadnezzarII01(-603).01.01T:18:13:00+03:00, 1500904]
|
127
|
+
# [NebuchadnezzarII01(-603).01.01T:18:14:00+03:00, 1500904]
|
128
|
+
# [NebuchadnezzarII01(-603).01.02T*18:15:00+03:00, 1500905]
|
129
|
+
# [NebuchadnezzarII01(-603).01.02T*18:16:00+03:00, 1500905]
|
130
|
+
babylonian_date += When::PT1M
|
131
|
+
end
|
132
|
+
|
133
|
+
# Web service ----------------------------------
|
134
|
+
# retrieve JSON response from http://hosi.org:3000 (when_exe demonstration web server)
|
135
|
+
require 'open-uri'
|
136
|
+
open('http://hosi.org:3000/Date/2014-04-20.json') do |json|
|
137
|
+
puts json.read #=> newlines and blanks are inserted for readability.
|
138
|
+
# {"frame" : "http://hosi.org/When/CalendarTypes/Gregorian",
|
139
|
+
# "precision": 0,
|
140
|
+
# "location" : "http://hosi.org/When/Coordinates/Spatial?long=139.4441E&lat=35.3916N&alt=0.0",
|
141
|
+
# "sdn" : 2456768,
|
142
|
+
# "calendar" : ["http://hosi.org/When/CalendarTypes/Gregorian"],
|
143
|
+
# "notes" : [[{"note":"Month","value":"April"}],
|
144
|
+
# [{"note":"Week","value":"Sunday(6)"}]],
|
145
|
+
# "clock" : "Asia/Tokyo+09:00",
|
146
|
+
# "clk_time" : [2456768,0,0,0],
|
147
|
+
# "dynamical": 1397919667.184082,
|
148
|
+
# "universal": 1397919600.0,
|
149
|
+
# "cal_date" : [2014,4,20]}
|
150
|
+
end
|
151
|
+
|
152
|
+
# TZInfo --------------------------------------
|
153
|
+
# https://rubygems.org/gems/tzinfo is required for this section's operations.
|
154
|
+
# Please install tzinfo before operation.
|
155
|
+
|
156
|
+
gregorian_date = When.tm_pos(2014, 8, 1, 9, 0, 0, :tz=>'Asia/Tokyo')
|
157
|
+
p gregorian_date #=> 2014-08-01T09:00:00+09:00
|
158
|
+
p gregorian_date.location.iri #=> "http://hosi.org/When/Coordinates/Spatial?long=139.4441E&lat=35.3916N&label=Asia/Tokyo"
|
159
|
+
p gregorian_date.sunrise.floor(When::MINUTE) #=> 2014-08-01T04:48+09:00
|
160
|
+
p gregorian_date.sunset.floor(When::MINUTE) #=> 2014-08-01T18:45+09:00
|
161
|
+
|
162
|
+
jst = When.tm_pos(1997, 4, 6, 15, 30, 00, :tz=>'Asia/Tokyo')
|
163
|
+
p jst #=> 1997-04-06T15:30:00+09:00
|
164
|
+
est = When.Clock('America/New_York') ^ jst
|
165
|
+
p est #=> 1997-04-06T01:30:00-05:00
|
166
|
+
jst = When.tm_pos(1997, 4, 6, 16, 30, 00, :tz=>'Asia/Tokyo')
|
167
|
+
p jst #=> 1997-04-06T16:30:00+09:00
|
168
|
+
edt = When.Clock('America/New_York') ^ jst
|
169
|
+
p edt #=> 1997-04-06T03:30:00-04:00
|
170
|
+
|
171
|
+
p When.when?('TZID=America/New_York:1997-10-26T01:30') #=> 1997-10-26T01:30-04:00
|
172
|
+
p When.when?('TZID=America/New_York:1997-10-26T01=30') #=> 1997-10-26T01:30-05:00, '=' indicates "leap hour"
|
173
|
+
p When.when?('TZID=America/New_York:1997-10-26T02:30') #=> 1997-10-26T02:30-05:00
|
174
|
+
p When.when?('TZID=America/New_York:1997-10-26T03:30') #=> 1997-10-26T03:30-05:00
|
175
|
+
|
176
|
+
# Google Calendar ------------------------------
|
177
|
+
# https://github.com/suchowan/gcalapi is required for this section's operations.
|
178
|
+
# Please install gcalapi before operation.
|
179
|
+
# Please replace xxxxxxxx and ******** to valid id/password pair and access Google Calendar.
|
180
|
+
|
181
|
+
service = GoogleCalendar::Service.new('xxxxxxxx@gmail.com', '********')
|
182
|
+
feed = "http://www.google.com/calendar/feeds/%s__%s%%40holiday.calendar.google.com/public/full" %
|
183
|
+
['japanese', 'ja']
|
184
|
+
gcal = GoogleCalendar::Calendar::new(service, feed)
|
185
|
+
gcal.enum_for({'start-min'=>'2014-01-01', 'start-max'=>'2015-01-01',
|
186
|
+
'orderby'=>'starttime', 'sortorder'=>'a'
|
187
|
+
}).each do |range|
|
188
|
+
puts '%s - %s' % [range, range.events[0].summary] #=>
|
189
|
+
# 2014-01-01T00:00:00.00+09:00...2014-01-02T00:00:00.00+09:00 - 元日
|
190
|
+
# 2014-01-02T00:00:00.00+09:00...2014-01-03T00:00:00.00+09:00 - 銀行休業日
|
191
|
+
# 2014-01-03T00:00:00.00+09:00...2014-01-04T00:00:00.00+09:00 - 銀行休業日
|
192
|
+
# 2014-01-13T00:00:00.00+09:00...2014-01-14T00:00:00.00+09:00 - 成人の日
|
193
|
+
# 2014-02-11T00:00:00.00+09:00...2014-02-12T00:00:00.00+09:00 - 建国記念の日
|
194
|
+
# 2014-03-21T00:00:00.00+09:00...2014-03-22T00:00:00.00+09:00 - 春分の日
|
195
|
+
# 2014-04-29T00:00:00.00+09:00...2014-04-30T00:00:00.00+09:00 - 昭和の日
|
196
|
+
# 2014-05-03T00:00:00.00+09:00...2014-05-04T00:00:00.00+09:00 - 憲法記念日
|
197
|
+
# 2014-05-04T00:00:00.00+09:00...2014-05-05T00:00:00.00+09:00 - みどりの日
|
198
|
+
# 2014-05-05T00:00:00.00+09:00...2014-05-06T00:00:00.00+09:00 - こどもの日
|
199
|
+
# 2014-05-06T00:00:00.00+09:00...2014-05-07T00:00:00.00+09:00 - みどりの日 振替休日
|
200
|
+
# 2014-07-21T00:00:00.00+09:00...2014-07-22T00:00:00.00+09:00 - 海の日
|
201
|
+
# 2014-09-15T00:00:00.00+09:00...2014-09-16T00:00:00.00+09:00 - 敬老の日
|
202
|
+
# 2014-09-23T00:00:00.00+09:00...2014-09-24T00:00:00.00+09:00 - 秋分の日
|
203
|
+
# 2014-10-13T00:00:00.00+09:00...2014-10-14T00:00:00.00+09:00 - 体育の日
|
204
|
+
# 2014-11-03T00:00:00.00+09:00...2014-11-04T00:00:00.00+09:00 - 文化の日
|
205
|
+
# 2014-11-23T00:00:00.00+09:00...2014-11-24T00:00:00.00+09:00 - 勤労感謝の日
|
206
|
+
# 2014-11-24T00:00:00.00+09:00...2014-11-25T00:00:00.00+09:00 - 勤労感謝の日 振替休日
|
207
|
+
# 2014-12-23T00:00:00.00+09:00...2014-12-24T00:00:00.00+09:00 - 天皇誕生日
|
208
|
+
# 2014-12-25T00:00:00.00+09:00...2014-12-26T00:00:00.00+09:00 - クリスマス
|
209
|
+
# 2014-12-31T00:00:00.00+09:00...2015-01-01T00:00:00.00+09:00 - 大晦日
|
210
|
+
end
|
211
|
+
|
212
|
+
For further detail, please refer to the [when_exe Wiki](http://www2u.biglobe.ne.jp/~suchowan/when_exe_wiki.html) pages.
|
data/lib/when_exe.rb
CHANGED
@@ -279,6 +279,8 @@ module When
|
|
279
279
|
autoload :ChineseSolar, 'when_exe/region/chinese'
|
280
280
|
autoload :ChineseLuniSolar, 'when_exe/region/chinese'
|
281
281
|
autoload :Yi, 'when_exe/region/chinese'
|
282
|
+
autoload :TenrekiA, 'when_exe/region/chinese'
|
283
|
+
autoload :TenrekiB, 'when_exe/region/chinese'
|
282
284
|
autoload :Korean, 'when_exe/region/korean'
|
283
285
|
autoload :Tibetan, 'when_exe/region/tibetan'
|
284
286
|
autoload :Thai, 'when_exe/region/thai'
|
@@ -366,9 +368,9 @@ module When
|
|
366
368
|
autoload :Bahai, 'when_exe/region/bahai'
|
367
369
|
autoload :Roman, 'when_exe/region/roman'
|
368
370
|
autoload :Mayan, 'when_exe/region/mayan'
|
369
|
-
autoload :
|
370
|
-
autoload :CommonWithSovietFiveDay,
|
371
|
-
autoload :SovietFiveDayWeek,
|
371
|
+
autoload :DiscordianWeek, 'when_exe/region/discordian'
|
372
|
+
autoload :CommonWithSovietFiveDay, 'when_exe/region/soviet'
|
373
|
+
autoload :SovietFiveDayWeek, 'when_exe/region/soviet'
|
372
374
|
autoload :CommonWithSovietSixDay, 'when_exe/region/soviet'
|
373
375
|
autoload :SovietSixDayWeek, 'when_exe/region/soviet'
|
374
376
|
# autoload :Yerm, 'when_exe/region/yerm'
|
@@ -449,17 +451,17 @@ module When
|
|
449
451
|
autoload :LongCount, 'when_exe/region/mayan'
|
450
452
|
|
451
453
|
# Defualt search path for Epochs and Eras
|
452
|
-
DefaultEpochs = ['Common',
|
453
|
-
'Hijra',
|
454
|
-
'Roman',
|
454
|
+
DefaultEpochs = ['Common', 'ModernJapanese',
|
455
|
+
'Hijra', 'Jewish', 'Iranian',
|
456
|
+
'Roman', 'Byzantine', 'AncientOrient', 'LongCount',
|
455
457
|
'BalineseLuniSolar', 'JavaneseLunar',
|
456
|
-
'Japanese',
|
457
|
-
'Chinese',
|
458
|
-
'
|
459
|
-
'
|
458
|
+
'Japanese', 'NihonKoki', 'NihonShoki',
|
459
|
+
'Chinese', 'Ryukyu', 'Vietnamese', 'Korean',
|
460
|
+
'JapaneseLuniSolar', 'JapaneseSolar',
|
461
|
+
'ChineseLuniSolar', 'ChineseSolar',
|
460
462
|
'Manchurian', 'Rouran', 'Gaochang',
|
461
|
-
'Yunnan',
|
462
|
-
'Pope'
|
463
|
+
'Yunnan', 'WesternXia', 'KaraKhitan', # 'Tibetan',
|
464
|
+
'Pope', 'JapanesePrimeMinister']
|
463
465
|
|
464
466
|
# Defualt events for Epochs and Eras
|
465
467
|
DefaultEvents = Hash[*([['@A', 'Accession' ],
|