hebrew_date 1.1.1 → 1.1.2
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/Rakefile +5 -0
- data/lib/hebrew_date.rb +14 -14
- data/lib/support/holidays.rb +2 -1
- data/lib/support/parshiot.rb +1 -1
- metadata +9 -78
- data/.gitignore +0 -21
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -36
- data/doc/HebrewDate.html +0 -4153
- data/doc/HebrewDateSupport/HolidayMethods/ClassMethods.html +0 -466
- data/doc/HebrewDateSupport/HolidayMethods.html +0 -1267
- data/doc/HebrewDateSupport/ParshaMethods.html +0 -637
- data/doc/HebrewDateSupport.html +0 -117
- data/doc/JqrHelpers/Rails.html +0 -117
- data/doc/_index.html +0 -152
- data/doc/class_list.html +0 -54
- data/doc/css/common.css +0 -1
- data/doc/css/full_list.css +0 -57
- data/doc/css/style.css +0 -338
- data/doc/file.README.html +0 -180
- data/doc/file_list.html +0 -56
- data/doc/frames.html +0 -26
- data/doc/index.html +0 -180
- data/doc/js/app.js +0 -219
- data/doc/js/full_list.js +0 -178
- data/doc/js/jquery.js +0 -4
- data/doc/method_list.html +0 -353
- data/doc/top-level-namespace.html +0 -114
- data/hebrew_date.gemspec +0 -23
- data/spec/hebrew_date_spec.rb +0 -76
data/doc/HebrewDate.html
DELETED
|
@@ -1,4153 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
-
<title>
|
|
7
|
-
Class: HebrewDate
|
|
8
|
-
|
|
9
|
-
— Documentation by YARD 0.8.7.3
|
|
10
|
-
|
|
11
|
-
</title>
|
|
12
|
-
|
|
13
|
-
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
|
|
14
|
-
|
|
15
|
-
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
|
|
16
|
-
|
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
|
19
|
-
relpath = '';
|
|
20
|
-
framesUrl = "frames.html#!" + escape(window.location.href);
|
|
21
|
-
</script>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
|
25
|
-
|
|
26
|
-
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</head>
|
|
30
|
-
<body>
|
|
31
|
-
<div id="header">
|
|
32
|
-
<div id="menu">
|
|
33
|
-
|
|
34
|
-
<a href="_index.html">Index (H)</a> »
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<span class="title">HebrewDate</span>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
41
|
-
</div>
|
|
42
|
-
|
|
43
|
-
<div id="search">
|
|
44
|
-
|
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
|
46
|
-
href="class_list.html">
|
|
47
|
-
Class List
|
|
48
|
-
</a>
|
|
49
|
-
|
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
|
51
|
-
href="method_list.html">
|
|
52
|
-
Method List
|
|
53
|
-
</a>
|
|
54
|
-
|
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
|
56
|
-
href="file_list.html">
|
|
57
|
-
File List
|
|
58
|
-
</a>
|
|
59
|
-
|
|
60
|
-
</div>
|
|
61
|
-
<div class="clear"></div>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<iframe id="search_frame"></iframe>
|
|
65
|
-
|
|
66
|
-
<div id="content"><h1>Class: HebrewDate
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</h1>
|
|
71
|
-
|
|
72
|
-
<dl class="box">
|
|
73
|
-
|
|
74
|
-
<dt class="r1">Inherits:</dt>
|
|
75
|
-
<dd class="r1">
|
|
76
|
-
<span class="inheritName">Delegator</span>
|
|
77
|
-
|
|
78
|
-
<ul class="fullTree">
|
|
79
|
-
<li>Object</li>
|
|
80
|
-
|
|
81
|
-
<li class="next">Delegator</li>
|
|
82
|
-
|
|
83
|
-
<li class="next">HebrewDate</li>
|
|
84
|
-
|
|
85
|
-
</ul>
|
|
86
|
-
<a href="#" class="inheritanceTree">show all</a>
|
|
87
|
-
|
|
88
|
-
</dd>
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
<dt class="r2">Extended by:</dt>
|
|
94
|
-
<dd class="r2"><span class='object_link'><a href="HebrewDateSupport/HolidayMethods/ClassMethods.html" title="HebrewDateSupport::HolidayMethods::ClassMethods (module)">HebrewDateSupport::HolidayMethods::ClassMethods</a></span></dd>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<dt class="r1">Includes:</dt>
|
|
100
|
-
<dd class="r1"><span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html" title="HebrewDateSupport::HolidayMethods (module)">HebrewDateSupport::HolidayMethods</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html" title="HebrewDateSupport::ParshaMethods (module)">HebrewDateSupport::ParshaMethods</a></span></dd>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<dt class="r2 last">Defined in:</dt>
|
|
107
|
-
<dd class="r2 last">lib/hebrew_date.rb</dd>
|
|
108
|
-
|
|
109
|
-
</dl>
|
|
110
|
-
<div class="clear"></div>
|
|
111
|
-
|
|
112
|
-
<h2>Overview</h2><div class="docstring">
|
|
113
|
-
<div class="discussion">
|
|
114
|
-
|
|
115
|
-
<p>A class that represents a date in both the Gregorian and Hebrew calendars
|
|
116
|
-
simultaneously. Note that you may call any Date methods on this class and
|
|
117
|
-
it should respond accordingly.</p>
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<div class="tags">
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
</div>
|
|
126
|
-
<h2>Constant Summary</h2>
|
|
127
|
-
|
|
128
|
-
<dl class="constants">
|
|
129
|
-
|
|
130
|
-
<dt id="HEBREW_EPOCH-constant" class="">HEBREW_EPOCH =
|
|
131
|
-
|
|
132
|
-
</dt>
|
|
133
|
-
<dd><pre class="code"><span class='op'>-</span><span class='int'>1373429</span></pre></dd>
|
|
134
|
-
|
|
135
|
-
<dt id="HEBREW_MONTH_NAMES-constant" class="">HEBREW_MONTH_NAMES =
|
|
136
|
-
|
|
137
|
-
</dt>
|
|
138
|
-
<dd><pre class="code"><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Nissan</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Iyar</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Sivan</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Tammuz</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Av</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Elul</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
139
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Tishrei</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Cheshvan</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Kislev</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Teves</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Shvat</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
|
140
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Adar</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Adar II</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span></pre></dd>
|
|
141
|
-
|
|
142
|
-
</dl>
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
<h3 class="inherited">Constants included
|
|
150
|
-
from <span class='object_link'><a href="HebrewDateSupport/HolidayMethods/ClassMethods.html" title="HebrewDateSupport::HolidayMethods::ClassMethods (module)">HebrewDateSupport::HolidayMethods::ClassMethods</a></span></h3>
|
|
151
|
-
<p class="inherited"><span class='object_link'><a href="HebrewDateSupport/HolidayMethods/ClassMethods.html#HOLIDAYS-constant" title="HebrewDateSupport::HolidayMethods::ClassMethods::HOLIDAYS (constant)">HebrewDateSupport::HolidayMethods::ClassMethods::HOLIDAYS</a></span></p>
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
<h3 class="inherited">Constants included
|
|
156
|
-
from <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html" title="HebrewDateSupport::ParshaMethods (module)">HebrewDateSupport::ParshaMethods</a></span></h3>
|
|
157
|
-
<p class="inherited"><span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#MON_LONG-constant" title="HebrewDateSupport::ParshaMethods::MON_LONG (constant)">HebrewDateSupport::ParshaMethods::MON_LONG</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#MON_LONG_LEAP-constant" title="HebrewDateSupport::ParshaMethods::MON_LONG_LEAP (constant)">HebrewDateSupport::ParshaMethods::MON_LONG_LEAP</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#MON_LONG_LEAP_ISRAEL-constant" title="HebrewDateSupport::ParshaMethods::MON_LONG_LEAP_ISRAEL (constant)">HebrewDateSupport::ParshaMethods::MON_LONG_LEAP_ISRAEL</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#MON_SHORT-constant" title="HebrewDateSupport::ParshaMethods::MON_SHORT (constant)">HebrewDateSupport::ParshaMethods::MON_SHORT</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#MON_SHORT_LEAP-constant" title="HebrewDateSupport::ParshaMethods::MON_SHORT_LEAP (constant)">HebrewDateSupport::ParshaMethods::MON_SHORT_LEAP</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#MON_SHORT_LEAP_ISRAEL-constant" title="HebrewDateSupport::ParshaMethods::MON_SHORT_LEAP_ISRAEL (constant)">HebrewDateSupport::ParshaMethods::MON_SHORT_LEAP_ISRAEL</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#PARSHA_NAMES-constant" title="HebrewDateSupport::ParshaMethods::PARSHA_NAMES (constant)">HebrewDateSupport::ParshaMethods::PARSHA_NAMES</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#SAT_LONG-constant" title="HebrewDateSupport::ParshaMethods::SAT_LONG (constant)">HebrewDateSupport::ParshaMethods::SAT_LONG</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#SAT_LONG_LEAP-constant" title="HebrewDateSupport::ParshaMethods::SAT_LONG_LEAP (constant)">HebrewDateSupport::ParshaMethods::SAT_LONG_LEAP</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#SAT_SHORT-constant" title="HebrewDateSupport::ParshaMethods::SAT_SHORT (constant)">HebrewDateSupport::ParshaMethods::SAT_SHORT</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#SAT_SHORT_LEAP-constant" title="HebrewDateSupport::ParshaMethods::SAT_SHORT_LEAP (constant)">HebrewDateSupport::ParshaMethods::SAT_SHORT_LEAP</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#THU_LONG-constant" title="HebrewDateSupport::ParshaMethods::THU_LONG (constant)">HebrewDateSupport::ParshaMethods::THU_LONG</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#THU_LONG_LEAP-constant" title="HebrewDateSupport::ParshaMethods::THU_LONG_LEAP (constant)">HebrewDateSupport::ParshaMethods::THU_LONG_LEAP</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#THU_NORMAL-constant" title="HebrewDateSupport::ParshaMethods::THU_NORMAL (constant)">HebrewDateSupport::ParshaMethods::THU_NORMAL</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#THU_NORMAL_ISRAEL-constant" title="HebrewDateSupport::ParshaMethods::THU_NORMAL_ISRAEL (constant)">HebrewDateSupport::ParshaMethods::THU_NORMAL_ISRAEL</a></span>, <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#THU_SHORT_LEAP-constant" title="HebrewDateSupport::ParshaMethods::THU_SHORT_LEAP (constant)">HebrewDateSupport::ParshaMethods::THU_SHORT_LEAP</a></span></p>
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
<h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
|
161
|
-
<ul class="summary">
|
|
162
|
-
|
|
163
|
-
<li class="public ">
|
|
164
|
-
<span class="summary_signature">
|
|
165
|
-
|
|
166
|
-
<a href="#ashkenaz-class_method" title="ashkenaz (class method)">+ (Boolean) <strong>ashkenaz</strong> </a>
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
</span>
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
<span class="summary_desc"><div class='inline'>
|
|
184
|
-
<p>Whether to use Ashkenazi pronunciation.</p>
|
|
185
|
-
</div></span>
|
|
186
|
-
|
|
187
|
-
</li>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
<li class="public ">
|
|
191
|
-
<span class="summary_signature">
|
|
192
|
-
|
|
193
|
-
<a href="#debug-class_method" title="debug (class method)">+ (Object) <strong>debug</strong> </a>
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
</span>
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
211
|
-
|
|
212
|
-
</li>
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
<li class="public ">
|
|
216
|
-
<span class="summary_signature">
|
|
217
|
-
|
|
218
|
-
<a href="#israeli-class_method" title="israeli (class method)">+ (Boolean) <strong>israeli</strong> </a>
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
</span>
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<span class="summary_desc"><div class='inline'>
|
|
236
|
-
<p>Whether to use Israeli parsha/holiday scheme.</p>
|
|
237
|
-
</div></span>
|
|
238
|
-
|
|
239
|
-
</li>
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
<li class="public ">
|
|
243
|
-
<span class="summary_signature">
|
|
244
|
-
|
|
245
|
-
<a href="#replace_saturday-class_method" title="replace_saturday (class method)">+ (Boolean) <strong>replace_saturday</strong> </a>
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
</span>
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
<span class="summary_desc"><div class='inline'>
|
|
263
|
-
<p>If true, replaces “Saturday” or “Sat” in <span class='object_link'><a href="#strftime-instance_method" title="HebrewDate#strftime (method)">#strftime</a></span> with “Shabbat” or
|
|
264
|
-
“Shabbos” depending on the #ashkenaz value.</p>
|
|
265
|
-
</div></span>
|
|
266
|
-
|
|
267
|
-
</li>
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
</ul>
|
|
271
|
-
|
|
272
|
-
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
|
273
|
-
<ul class="summary">
|
|
274
|
-
|
|
275
|
-
<li class="public ">
|
|
276
|
-
<span class="summary_signature">
|
|
277
|
-
|
|
278
|
-
<a href="#abs_date-instance_method" title="#abs_date (instance method)">- (Object) <strong>abs_date</strong> </a>
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
</span>
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
<span class="note title readonly">readonly</span>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
298
|
-
|
|
299
|
-
</li>
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
<li class="public ">
|
|
303
|
-
<span class="summary_signature">
|
|
304
|
-
|
|
305
|
-
<a href="#date-instance_method" title="#date (instance method)">- (Integer) <strong>date</strong> </a>
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
</span>
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
<span class="note title readonly">readonly</span>
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
<span class="summary_desc"><div class='inline'>
|
|
325
|
-
<p>The current Gregorian day of the month (1-31).</p>
|
|
326
|
-
</div></span>
|
|
327
|
-
|
|
328
|
-
</li>
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
<li class="public ">
|
|
332
|
-
<span class="summary_signature">
|
|
333
|
-
|
|
334
|
-
<a href="#hebrew_date-instance_method" title="#hebrew_date (instance method)">- (Integer) <strong>hebrew_date</strong> </a>
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
</span>
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
<span class="note title readonly">readonly</span>
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
<span class="summary_desc"><div class='inline'>
|
|
354
|
-
<p>The current Hebrew date (1-30).</p>
|
|
355
|
-
</div></span>
|
|
356
|
-
|
|
357
|
-
</li>
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
<li class="public ">
|
|
361
|
-
<span class="summary_signature">
|
|
362
|
-
|
|
363
|
-
<a href="#hebrew_month-instance_method" title="#hebrew_month (instance method)">- (Integer) <strong>hebrew_month</strong> </a>
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
</span>
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
<span class="note title readonly">readonly</span>
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
<span class="summary_desc"><div class='inline'>
|
|
383
|
-
<p>The current Hebrew month (1-13).</p>
|
|
384
|
-
</div></span>
|
|
385
|
-
|
|
386
|
-
</li>
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
<li class="public ">
|
|
390
|
-
<span class="summary_signature">
|
|
391
|
-
|
|
392
|
-
<a href="#hebrew_year-instance_method" title="#hebrew_year (instance method)">- (Integer) <strong>hebrew_year</strong> </a>
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
</span>
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
<span class="note title readonly">readonly</span>
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
<span class="summary_desc"><div class='inline'>
|
|
412
|
-
<p>The current Hebrew year (e.g. 5775).</p>
|
|
413
|
-
</div></span>
|
|
414
|
-
|
|
415
|
-
</li>
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
<li class="public ">
|
|
419
|
-
<span class="summary_signature">
|
|
420
|
-
|
|
421
|
-
<a href="#month-instance_method" title="#month (instance method)">- (Integer) <strong>month</strong> </a>
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
</span>
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
<span class="note title readonly">readonly</span>
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
<span class="summary_desc"><div class='inline'>
|
|
441
|
-
<p>The current Gregorian month (1-12).</p>
|
|
442
|
-
</div></span>
|
|
443
|
-
|
|
444
|
-
</li>
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
<li class="public ">
|
|
448
|
-
<span class="summary_signature">
|
|
449
|
-
|
|
450
|
-
<a href="#year-instance_method" title="#year (instance method)">- (Integer) <strong>year</strong> </a>
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
</span>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
<span class="note title readonly">readonly</span>
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
<span class="summary_desc"><div class='inline'>
|
|
470
|
-
<p>The current Gregorian year (e.g. 2008).</p>
|
|
471
|
-
</div></span>
|
|
472
|
-
|
|
473
|
-
</li>
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
</ul>
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
<h2>
|
|
483
|
-
Class Method Summary
|
|
484
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
485
|
-
</h2>
|
|
486
|
-
|
|
487
|
-
<ul class="summary">
|
|
488
|
-
|
|
489
|
-
<li class="public ">
|
|
490
|
-
<span class="summary_signature">
|
|
491
|
-
|
|
492
|
-
<a href="#day_name-class_method" title="day_name (class method)">+ (String) <strong>day_name</strong>(day) </a>
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
</span>
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
<span class="summary_desc"><div class='inline'>
|
|
507
|
-
<p>Get the name of the given day (1-7).</p>
|
|
508
|
-
</div></span>
|
|
509
|
-
|
|
510
|
-
</li>
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
<li class="public ">
|
|
514
|
-
<span class="summary_signature">
|
|
515
|
-
|
|
516
|
-
<a href="#hebrew_leap_year%3F-class_method" title="hebrew_leap_year? (class method)">+ (Boolean) <strong>hebrew_leap_year?</strong>(year) </a>
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
</span>
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
<span class="summary_desc"><div class='inline'>
|
|
531
|
-
<p>Is this a Hebrew leap year?.</p>
|
|
532
|
-
</div></span>
|
|
533
|
-
|
|
534
|
-
</li>
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
<li class="public ">
|
|
538
|
-
<span class="summary_signature">
|
|
539
|
-
|
|
540
|
-
<a href="#hebrew_month_to_s-class_method" title="hebrew_month_to_s (class method)">+ (String) <strong>hebrew_month_to_s</strong>(month, year = nil) </a>
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
</span>
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
<span class="summary_desc"><div class='inline'>
|
|
555
|
-
<p>Get the name of the given Hebrew month.</p>
|
|
556
|
-
</div></span>
|
|
557
|
-
|
|
558
|
-
</li>
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
<li class="public ">
|
|
562
|
-
<span class="summary_signature">
|
|
563
|
-
|
|
564
|
-
<a href="#last_month_of_hebrew_year-class_method" title="last_month_of_hebrew_year (class method)">+ (Integer) <strong>last_month_of_hebrew_year</strong>(year) </a>
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
</span>
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
<span class="summary_desc"><div class='inline'>
|
|
579
|
-
<p>The last month in the Hebrew year (12 or 13).</p>
|
|
580
|
-
</div></span>
|
|
581
|
-
|
|
582
|
-
</li>
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
<li class="public ">
|
|
586
|
-
<span class="summary_signature">
|
|
587
|
-
|
|
588
|
-
<a href="#new_from_hebrew-class_method" title="new_from_hebrew (class method)">+ (Object) <strong>new_from_hebrew</strong>(year, month, date) </a>
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
</span>
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
<span class="summary_desc"><div class='inline'>
|
|
603
|
-
<p>Create a HebrewDate with initialized Hebrew date values.</p>
|
|
604
|
-
</div></span>
|
|
605
|
-
|
|
606
|
-
</li>
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
</ul>
|
|
610
|
-
|
|
611
|
-
<h2>
|
|
612
|
-
Instance Method Summary
|
|
613
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
614
|
-
</h2>
|
|
615
|
-
|
|
616
|
-
<ul class="summary">
|
|
617
|
-
|
|
618
|
-
<li class="public ">
|
|
619
|
-
<span class="summary_signature">
|
|
620
|
-
|
|
621
|
-
<a href="#%2B-instance_method" title="#+ (instance method)">- (HebrewDate) <strong>+</strong>(other) </a>
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
</span>
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
636
|
-
|
|
637
|
-
</li>
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
<li class="public ">
|
|
641
|
-
<span class="summary_signature">
|
|
642
|
-
|
|
643
|
-
<a href="#--instance_method" title="#- (instance method)">- (HebrewDate) <strong>-</strong>(other) </a>
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
</span>
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
658
|
-
|
|
659
|
-
</li>
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
<li class="public ">
|
|
663
|
-
<span class="summary_signature">
|
|
664
|
-
|
|
665
|
-
<a href="#%3C%3D%3E-instance_method" title="#<=> (instance method)">- (Integer) <strong><=></strong>(other) </a>
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
</span>
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
<span class="summary_desc"><div class='inline'>
|
|
680
|
-
<p>Comparison operator.</p>
|
|
681
|
-
</div></span>
|
|
682
|
-
|
|
683
|
-
</li>
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
<li class="public ">
|
|
687
|
-
<span class="summary_signature">
|
|
688
|
-
|
|
689
|
-
<a href="#__getobj__-instance_method" title="#__getobj__ (instance method)">- (Object) <strong>__getobj__</strong> </a>
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
</span>
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
704
|
-
|
|
705
|
-
</li>
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
<li class="public ">
|
|
709
|
-
<span class="summary_signature">
|
|
710
|
-
|
|
711
|
-
<a href="#__setobj__-instance_method" title="#__setobj__ (instance method)">- (Object) <strong>__setobj__</strong>(obj) </a>
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
</span>
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
726
|
-
|
|
727
|
-
</li>
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
<li class="public ">
|
|
731
|
-
<span class="summary_signature">
|
|
732
|
-
|
|
733
|
-
<a href="#back-instance_method" title="#back (instance method)">- (HebrewDate) <strong>back</strong> </a>
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
</span>
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
<span class="summary_desc"><div class='inline'>
|
|
748
|
-
<p>Move back one day.</p>
|
|
749
|
-
</div></span>
|
|
750
|
-
|
|
751
|
-
</li>
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
<li class="public ">
|
|
755
|
-
<span class="summary_signature">
|
|
756
|
-
|
|
757
|
-
<a href="#day-instance_method" title="#day (instance method)">- (Integer) <strong>day</strong> </a>
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
</span>
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
<span class="summary_desc"><div class='inline'>
|
|
772
|
-
<p>Get the day of the week.</p>
|
|
773
|
-
</div></span>
|
|
774
|
-
|
|
775
|
-
</li>
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
<li class="public ">
|
|
779
|
-
<span class="summary_signature">
|
|
780
|
-
|
|
781
|
-
<a href="#downto-instance_method" title="#downto (instance method)">- (Enumerator|self) <strong>downto</strong>(min, &block) </a>
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
</span>
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
<span class="summary_desc"><div class='inline'>
|
|
796
|
-
<p>This method is equivalent to step(min, -1){|date| …}.</p>
|
|
797
|
-
</div></span>
|
|
798
|
-
|
|
799
|
-
</li>
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
<li class="public ">
|
|
803
|
-
<span class="summary_signature">
|
|
804
|
-
|
|
805
|
-
<a href="#forward-instance_method" title="#forward (instance method)">- (HebrewDate) <strong>forward</strong> </a>
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
</span>
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
<span class="summary_desc"><div class='inline'>
|
|
820
|
-
<p>Move forward one day.</p>
|
|
821
|
-
</div></span>
|
|
822
|
-
|
|
823
|
-
</li>
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
<li class="public ">
|
|
827
|
-
<span class="summary_signature">
|
|
828
|
-
|
|
829
|
-
<a href="#hebrew_leap_year%3F-instance_method" title="#hebrew_leap_year? (instance method)">- (Boolean) <strong>hebrew_leap_year?</strong> </a>
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
</span>
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
<span class="summary_desc"><div class='inline'>
|
|
844
|
-
<p>Is this a Hebrew leap year?.</p>
|
|
845
|
-
</div></span>
|
|
846
|
-
|
|
847
|
-
</li>
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
<li class="public ">
|
|
851
|
-
<span class="summary_signature">
|
|
852
|
-
|
|
853
|
-
<a href="#hebrew_month_to_s-instance_method" title="#hebrew_month_to_s (instance method)">- (String) <strong>hebrew_month_to_s</strong> </a>
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
</span>
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
<span class="summary_desc"><div class='inline'>
|
|
868
|
-
<p>Get the name of the current Hebrew month.</p>
|
|
869
|
-
</div></span>
|
|
870
|
-
|
|
871
|
-
</li>
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
<li class="public ">
|
|
875
|
-
<span class="summary_signature">
|
|
876
|
-
|
|
877
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">- (HebrewDate) <strong>initialize</strong>(year_or_date_object = nil, month = nil, date = nil) </a>
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
</span>
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
<span class="note title constructor">constructor</span>
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
<span class="summary_desc"><div class='inline'>
|
|
894
|
-
<p>A new instance of HebrewDate.</p>
|
|
895
|
-
</div></span>
|
|
896
|
-
|
|
897
|
-
</li>
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
<li class="public ">
|
|
901
|
-
<span class="summary_signature">
|
|
902
|
-
|
|
903
|
-
<a href="#inspect-instance_method" title="#inspect (instance method)">- (Object) <strong>inspect</strong> </a>
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
</span>
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
918
|
-
|
|
919
|
-
</li>
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
<li class="public ">
|
|
923
|
-
<span class="summary_signature">
|
|
924
|
-
|
|
925
|
-
<a href="#last_day_of_hebrew_month-instance_method" title="#last_day_of_hebrew_month (instance method)">- (Integer) <strong>last_day_of_hebrew_month</strong>(month = nil) </a>
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
</span>
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
<span class="summary_desc"><div class='inline'>
|
|
940
|
-
<p>Last day of the current Hebrew month.</p>
|
|
941
|
-
</div></span>
|
|
942
|
-
|
|
943
|
-
</li>
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
<li class="public ">
|
|
947
|
-
<span class="summary_signature">
|
|
948
|
-
|
|
949
|
-
<a href="#last_day_of_month-instance_method" title="#last_day_of_month (instance method)">- (Integer) <strong>last_day_of_month</strong>(month = nil) </a>
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
</span>
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
<span class="summary_desc"><div class='inline'>
|
|
964
|
-
<p>The last day of the Gregorian month.</p>
|
|
965
|
-
</div></span>
|
|
966
|
-
|
|
967
|
-
</li>
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
<li class="public ">
|
|
971
|
-
<span class="summary_signature">
|
|
972
|
-
|
|
973
|
-
<a href="#last_month_of_hebrew_year-instance_method" title="#last_month_of_hebrew_year (instance method)">- (Integer) <strong>last_month_of_hebrew_year</strong> </a>
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
</span>
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
<span class="summary_desc"><div class='inline'>
|
|
988
|
-
<p>The last month in this Hebrew year (12 or 13).</p>
|
|
989
|
-
</div></span>
|
|
990
|
-
|
|
991
|
-
</li>
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
<li class="public ">
|
|
995
|
-
<span class="summary_signature">
|
|
996
|
-
|
|
997
|
-
<a href="#next-instance_method" title="#next (instance method)">- (HebrewDate) <strong>next</strong> </a>
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
(also: #succ)
|
|
1002
|
-
|
|
1003
|
-
</span>
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
<span class="summary_desc"><div class='inline'>
|
|
1014
|
-
<p>This does not modify the current date, but creates a new one.</p>
|
|
1015
|
-
</div></span>
|
|
1016
|
-
|
|
1017
|
-
</li>
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
<li class="public ">
|
|
1021
|
-
<span class="summary_signature">
|
|
1022
|
-
|
|
1023
|
-
<a href="#set_date-instance_method" title="#set_date (instance method)">- (void) <strong>set_date</strong>(year, month, date) </a>
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
</span>
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
<span class="summary_desc"><div class='inline'>
|
|
1038
|
-
<p>Set the Gregorian date of this HebrewDate.</p>
|
|
1039
|
-
</div></span>
|
|
1040
|
-
|
|
1041
|
-
</li>
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
<li class="public ">
|
|
1045
|
-
<span class="summary_signature">
|
|
1046
|
-
|
|
1047
|
-
<a href="#set_hebrew_date-instance_method" title="#set_hebrew_date (instance method)">- (void) <strong>set_hebrew_date</strong>(year, month, date, auto_set = false) </a>
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
</span>
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
<span class="summary_desc"><div class='inline'>
|
|
1062
|
-
<p>Set the Hebrew date.</p>
|
|
1063
|
-
</div></span>
|
|
1064
|
-
|
|
1065
|
-
</li>
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
<li class="public ">
|
|
1069
|
-
<span class="summary_signature">
|
|
1070
|
-
|
|
1071
|
-
<a href="#shabbos%3F-instance_method" title="#shabbos? (instance method)">- (Boolean) <strong>shabbos?</strong> </a>
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
(also: #shabbat?)
|
|
1076
|
-
|
|
1077
|
-
</span>
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
|
1088
|
-
|
|
1089
|
-
</li>
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
<li class="public ">
|
|
1093
|
-
<span class="summary_signature">
|
|
1094
|
-
|
|
1095
|
-
<a href="#step-instance_method" title="#step (instance method)">- (Object) <strong>step</strong>(limit, step = 1, &block) </a>
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
</span>
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
<span class="summary_desc"><div class='inline'>
|
|
1110
|
-
<p>Iterates evaluation of the given block, which takes a HebrewDate object.</p>
|
|
1111
|
-
</div></span>
|
|
1112
|
-
|
|
1113
|
-
</li>
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
<li class="public ">
|
|
1117
|
-
<span class="summary_signature">
|
|
1118
|
-
|
|
1119
|
-
<a href="#strftime-instance_method" title="#strftime (instance method)">- (String) <strong>strftime</strong>(format) </a>
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
</span>
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
<span class="summary_desc"><div class='inline'>
|
|
1134
|
-
<p>Extend the Date strftime method by replacing Hebrew fields.</p>
|
|
1135
|
-
</div></span>
|
|
1136
|
-
|
|
1137
|
-
</li>
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
<li class="public ">
|
|
1141
|
-
<span class="summary_signature">
|
|
1142
|
-
|
|
1143
|
-
<a href="#to_date-instance_method" title="#to_date (instance method)">- (Date) <strong>to_date</strong> </a>
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
</span>
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
<span class="summary_desc"><div class='inline'>
|
|
1158
|
-
<p>Return a Ruby Date corresponding to the Gregorian date.</p>
|
|
1159
|
-
</div></span>
|
|
1160
|
-
|
|
1161
|
-
</li>
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
<li class="public ">
|
|
1165
|
-
<span class="summary_signature">
|
|
1166
|
-
|
|
1167
|
-
<a href="#upto-instance_method" title="#upto (instance method)">- (Enumerator|self) <strong>upto</strong>(max, &block) </a>
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
</span>
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
<span class="summary_desc"><div class='inline'>
|
|
1182
|
-
<p>This method is equivalent to step(max, 1){ |date| …}.</p>
|
|
1183
|
-
</div></span>
|
|
1184
|
-
|
|
1185
|
-
</li>
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
</ul>
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/HolidayMethods/ClassMethods.html" title="HebrewDateSupport::HolidayMethods::ClassMethods (module)">HebrewDateSupport::HolidayMethods::ClassMethods</a></span></h3>
|
|
1201
|
-
<p class="inherited"><span class='object_link'><a href="HebrewDateSupport/HolidayMethods/ClassMethods.html#from_holiday-instance_method" title="HebrewDateSupport::HolidayMethods::ClassMethods#from_holiday (method)">from_holiday</a></span></p>
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html" title="HebrewDateSupport::HolidayMethods (module)">HebrewDateSupport::HolidayMethods</a></span></h3>
|
|
1212
|
-
<p class="inherited"><span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#candle_lighting_day%3F-instance_method" title="HebrewDateSupport::HolidayMethods#candle_lighting_day? (method)">#candle_lighting_day?</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#first_day_yom_tov%3F-instance_method" title="HebrewDateSupport::HolidayMethods#first_day_yom_tov? (method)">#first_day_yom_tov?</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#havdala_day%3F-instance_method" title="HebrewDateSupport::HolidayMethods#havdala_day? (method)">#havdala_day?</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#holiday-instance_method" title="HebrewDateSupport::HolidayMethods#holiday (method)">#holiday</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#omer-instance_method" title="HebrewDateSupport::HolidayMethods#omer (method)">#omer</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#omer_to_s-instance_method" title="HebrewDateSupport::HolidayMethods#omer_to_s (method)">#omer_to_s</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#rosh_chodesh%3F-instance_method" title="HebrewDateSupport::HolidayMethods#rosh_chodesh? (method)">#rosh_chodesh?</a></span>, <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html#second_day_yom_tov%3F-instance_method" title="HebrewDateSupport::HolidayMethods#second_day_yom_tov? (method)">#second_day_yom_tov?</a></span></p>
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
<h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html" title="HebrewDateSupport::ParshaMethods (module)">HebrewDateSupport::ParshaMethods</a></span></h3>
|
|
1223
|
-
<p class="inherited"><span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#parsha-instance_method" title="HebrewDateSupport::ParshaMethods#parsha (method)">#parsha</a></span></p>
|
|
1224
|
-
|
|
1225
|
-
<div id="constructor_details" class="method_details_list">
|
|
1226
|
-
<h2>Constructor Details</h2>
|
|
1227
|
-
|
|
1228
|
-
<div class="method_details first">
|
|
1229
|
-
<h3 class="signature first" id="initialize-instance_method">
|
|
1230
|
-
|
|
1231
|
-
- (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>initialize</strong>(year_or_date_object = nil, month = nil, date = nil)
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
</h3><div class="docstring">
|
|
1238
|
-
<div class="discussion">
|
|
1239
|
-
|
|
1240
|
-
<p>Returns a new instance of HebrewDate</p>
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
</div>
|
|
1244
|
-
</div>
|
|
1245
|
-
<div class="tags">
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
</div><table class="source_code">
|
|
1249
|
-
<tr>
|
|
1250
|
-
<td>
|
|
1251
|
-
<pre class="lines">
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
64
|
|
1255
|
-
65
|
|
1256
|
-
66
|
|
1257
|
-
67
|
|
1258
|
-
68
|
|
1259
|
-
69
|
|
1260
|
-
70
|
|
1261
|
-
71
|
|
1262
|
-
72
|
|
1263
|
-
73
|
|
1264
|
-
74
|
|
1265
|
-
75
|
|
1266
|
-
76
|
|
1267
|
-
77
|
|
1268
|
-
78
|
|
1269
|
-
79
|
|
1270
|
-
80
|
|
1271
|
-
81
|
|
1272
|
-
82
|
|
1273
|
-
83
|
|
1274
|
-
84
|
|
1275
|
-
85
|
|
1276
|
-
86
|
|
1277
|
-
87</pre>
|
|
1278
|
-
</td>
|
|
1279
|
-
<td>
|
|
1280
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 64</span>
|
|
1281
|
-
|
|
1282
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_year_or_date_object'>year_or_date_object</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='op'>=</span><span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
|
1283
|
-
<span class='ivar'>@abs_date</span> <span class='op'>=</span> <span class='int'>0</span>
|
|
1284
|
-
<span class='id identifier rubyid_skip_hebrew_date'>skip_hebrew_date</span> <span class='op'>=</span> <span class='kw'>false</span>
|
|
1285
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_year_or_date_object'>year_or_date_object</span> <span class='op'>===</span> <span class='kw'>true</span>
|
|
1286
|
-
<span class='id identifier rubyid_skip_hebrew_date'>skip_hebrew_date</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
1287
|
-
<span class='id identifier rubyid_year_or_date_object'>year_or_date_object</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
|
1288
|
-
<span class='kw'>end</span>
|
|
1289
|
-
|
|
1290
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_month'>month</span> <span class='op'>&&</span> <span class='id identifier rubyid_date'>date</span>
|
|
1291
|
-
<span class='ivar'>@year</span> <span class='op'>=</span> <span class='id identifier rubyid_year_or_date_object'>year_or_date_object</span>
|
|
1292
|
-
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='id identifier rubyid_month'>month</span>
|
|
1293
|
-
<span class='ivar'>@date</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span>
|
|
1294
|
-
<span class='kw'>else</span>
|
|
1295
|
-
<span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='id identifier rubyid_year_or_date_object'>year_or_date_object</span> <span class='op'>||</span> <span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_today'>today</span>
|
|
1296
|
-
<span class='ivar'>@year</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span>
|
|
1297
|
-
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span>
|
|
1298
|
-
<span class='ivar'>@date</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_mday'>mday</span>
|
|
1299
|
-
<span class='kw'>end</span>
|
|
1300
|
-
<span class='ivar'>@israeli</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_israeli'>israeli</span>
|
|
1301
|
-
<span class='ivar'>@ashkenaz</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_ashkenaz'>ashkenaz</span>
|
|
1302
|
-
<span class='ivar'>@debug</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span>
|
|
1303
|
-
<span class='id identifier rubyid_set_date'>set_date</span><span class='lparen'>(</span><span class='ivar'>@year</span><span class='comma'>,</span> <span class='ivar'>@month</span><span class='comma'>,</span> <span class='ivar'>@date</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_skip_hebrew_date'>skip_hebrew_date</span>
|
|
1304
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span>
|
|
1305
|
-
<span class='kw'>end</span></pre>
|
|
1306
|
-
</td>
|
|
1307
|
-
</tr>
|
|
1308
|
-
</table>
|
|
1309
|
-
</div>
|
|
1310
|
-
|
|
1311
|
-
</div>
|
|
1312
|
-
|
|
1313
|
-
<div id="class_attr_details" class="attr_details">
|
|
1314
|
-
<h2>Class Attribute Details</h2>
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
<span id="ashkenaz=-class_method"></span>
|
|
1318
|
-
<div class="method_details first">
|
|
1319
|
-
<h3 class="signature first" id="ashkenaz-class_method">
|
|
1320
|
-
|
|
1321
|
-
+ (<tt>Boolean</tt>) <strong>ashkenaz</strong>
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
</h3><div class="docstring">
|
|
1328
|
-
<div class="discussion">
|
|
1329
|
-
|
|
1330
|
-
<p>Returns Whether to use Ashkenazi pronunciation.</p>
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
</div>
|
|
1334
|
-
</div>
|
|
1335
|
-
<div class="tags">
|
|
1336
|
-
|
|
1337
|
-
<p class="tag_title">Returns:</p>
|
|
1338
|
-
<ul class="return">
|
|
1339
|
-
|
|
1340
|
-
<li>
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
—
|
|
1348
|
-
<div class='inline'>
|
|
1349
|
-
<p>Whether to use Ashkenazi pronunciation.</p>
|
|
1350
|
-
</div>
|
|
1351
|
-
|
|
1352
|
-
</li>
|
|
1353
|
-
|
|
1354
|
-
</ul>
|
|
1355
|
-
|
|
1356
|
-
</div><table class="source_code">
|
|
1357
|
-
<tr>
|
|
1358
|
-
<td>
|
|
1359
|
-
<pre class="lines">
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
29
|
|
1363
|
-
30
|
|
1364
|
-
31</pre>
|
|
1365
|
-
</td>
|
|
1366
|
-
<td>
|
|
1367
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 29</span>
|
|
1368
|
-
|
|
1369
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_ashkenaz'>ashkenaz</span>
|
|
1370
|
-
<span class='ivar'>@ashkenaz</span>
|
|
1371
|
-
<span class='kw'>end</span></pre>
|
|
1372
|
-
</td>
|
|
1373
|
-
</tr>
|
|
1374
|
-
</table>
|
|
1375
|
-
</div>
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
<span id="debug=-class_method"></span>
|
|
1379
|
-
<div class="method_details ">
|
|
1380
|
-
<h3 class="signature " id="debug-class_method">
|
|
1381
|
-
|
|
1382
|
-
+ (<tt>Object</tt>) <strong>debug</strong>
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
</h3><table class="source_code">
|
|
1389
|
-
<tr>
|
|
1390
|
-
<td>
|
|
1391
|
-
<pre class="lines">
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
39
|
|
1395
|
-
40
|
|
1396
|
-
41</pre>
|
|
1397
|
-
</td>
|
|
1398
|
-
<td>
|
|
1399
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 39</span>
|
|
1400
|
-
|
|
1401
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_debug'>debug</span>
|
|
1402
|
-
<span class='ivar'>@debug</span>
|
|
1403
|
-
<span class='kw'>end</span></pre>
|
|
1404
|
-
</td>
|
|
1405
|
-
</tr>
|
|
1406
|
-
</table>
|
|
1407
|
-
</div>
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
<span id="israeli=-class_method"></span>
|
|
1411
|
-
<div class="method_details ">
|
|
1412
|
-
<h3 class="signature " id="israeli-class_method">
|
|
1413
|
-
|
|
1414
|
-
+ (<tt>Boolean</tt>) <strong>israeli</strong>
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
</h3><div class="docstring">
|
|
1421
|
-
<div class="discussion">
|
|
1422
|
-
|
|
1423
|
-
<p>Returns Whether to use Israeli parsha/holiday scheme.</p>
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
</div>
|
|
1427
|
-
</div>
|
|
1428
|
-
<div class="tags">
|
|
1429
|
-
|
|
1430
|
-
<p class="tag_title">Returns:</p>
|
|
1431
|
-
<ul class="return">
|
|
1432
|
-
|
|
1433
|
-
<li>
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
—
|
|
1441
|
-
<div class='inline'>
|
|
1442
|
-
<p>Whether to use Israeli parsha/holiday scheme.</p>
|
|
1443
|
-
</div>
|
|
1444
|
-
|
|
1445
|
-
</li>
|
|
1446
|
-
|
|
1447
|
-
</ul>
|
|
1448
|
-
|
|
1449
|
-
</div><table class="source_code">
|
|
1450
|
-
<tr>
|
|
1451
|
-
<td>
|
|
1452
|
-
<pre class="lines">
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
32
|
|
1456
|
-
33
|
|
1457
|
-
34</pre>
|
|
1458
|
-
</td>
|
|
1459
|
-
<td>
|
|
1460
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 32</span>
|
|
1461
|
-
|
|
1462
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_israeli'>israeli</span>
|
|
1463
|
-
<span class='ivar'>@israeli</span>
|
|
1464
|
-
<span class='kw'>end</span></pre>
|
|
1465
|
-
</td>
|
|
1466
|
-
</tr>
|
|
1467
|
-
</table>
|
|
1468
|
-
</div>
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
<span id="replace_saturday=-class_method"></span>
|
|
1472
|
-
<div class="method_details ">
|
|
1473
|
-
<h3 class="signature " id="replace_saturday-class_method">
|
|
1474
|
-
|
|
1475
|
-
+ (<tt>Boolean</tt>) <strong>replace_saturday</strong>
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
</h3><div class="docstring">
|
|
1482
|
-
<div class="discussion">
|
|
1483
|
-
|
|
1484
|
-
<p>Returns If true, replaces “Saturday” or “Sat” in <span class='object_link'><a href="#strftime-instance_method" title="HebrewDate#strftime (method)">#strftime</a></span> with “Shabbat”
|
|
1485
|
-
or “Shabbos” depending on the #ashkenaz value.</p>
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
</div>
|
|
1489
|
-
</div>
|
|
1490
|
-
<div class="tags">
|
|
1491
|
-
|
|
1492
|
-
<p class="tag_title">Returns:</p>
|
|
1493
|
-
<ul class="return">
|
|
1494
|
-
|
|
1495
|
-
<li>
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
—
|
|
1503
|
-
<div class='inline'>
|
|
1504
|
-
<p>If true, replaces “Saturday” or “Sat” in <span class='object_link'><a href="#strftime-instance_method" title="HebrewDate#strftime (method)">#strftime</a></span> with “Shabbat” or
|
|
1505
|
-
“Shabbos” depending on the #ashkenaz value.</p>
|
|
1506
|
-
</div>
|
|
1507
|
-
|
|
1508
|
-
</li>
|
|
1509
|
-
|
|
1510
|
-
</ul>
|
|
1511
|
-
|
|
1512
|
-
</div><table class="source_code">
|
|
1513
|
-
<tr>
|
|
1514
|
-
<td>
|
|
1515
|
-
<pre class="lines">
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
36
|
|
1519
|
-
37
|
|
1520
|
-
38</pre>
|
|
1521
|
-
</td>
|
|
1522
|
-
<td>
|
|
1523
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 36</span>
|
|
1524
|
-
|
|
1525
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_replace_saturday'>replace_saturday</span>
|
|
1526
|
-
<span class='ivar'>@replace_saturday</span>
|
|
1527
|
-
<span class='kw'>end</span></pre>
|
|
1528
|
-
</td>
|
|
1529
|
-
</tr>
|
|
1530
|
-
</table>
|
|
1531
|
-
</div>
|
|
1532
|
-
|
|
1533
|
-
</div>
|
|
1534
|
-
|
|
1535
|
-
<div id="instance_attr_details" class="attr_details">
|
|
1536
|
-
<h2>Instance Attribute Details</h2>
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
<span id=""></span>
|
|
1540
|
-
<div class="method_details first">
|
|
1541
|
-
<h3 class="signature first" id="abs_date-instance_method">
|
|
1542
|
-
|
|
1543
|
-
- (<tt>Object</tt>) <strong>abs_date</strong> <span class="extras">(readonly)</span>
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
</h3><table class="source_code">
|
|
1550
|
-
<tr>
|
|
1551
|
-
<td>
|
|
1552
|
-
<pre class="lines">
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
62
|
|
1556
|
-
63
|
|
1557
|
-
64</pre>
|
|
1558
|
-
</td>
|
|
1559
|
-
<td>
|
|
1560
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 62</span>
|
|
1561
|
-
|
|
1562
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_abs_date'>abs_date</span>
|
|
1563
|
-
<span class='ivar'>@abs_date</span>
|
|
1564
|
-
<span class='kw'>end</span></pre>
|
|
1565
|
-
</td>
|
|
1566
|
-
</tr>
|
|
1567
|
-
</table>
|
|
1568
|
-
</div>
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
<span id=""></span>
|
|
1572
|
-
<div class="method_details ">
|
|
1573
|
-
<h3 class="signature " id="date-instance_method">
|
|
1574
|
-
|
|
1575
|
-
- (<tt>Integer</tt>) <strong>date</strong> <span class="extras">(readonly)</span>
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
</h3><div class="docstring">
|
|
1582
|
-
<div class="discussion">
|
|
1583
|
-
|
|
1584
|
-
<p>Returns the current Gregorian day of the month (1-31).</p>
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
</div>
|
|
1588
|
-
</div>
|
|
1589
|
-
<div class="tags">
|
|
1590
|
-
|
|
1591
|
-
<p class="tag_title">Returns:</p>
|
|
1592
|
-
<ul class="return">
|
|
1593
|
-
|
|
1594
|
-
<li>
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
—
|
|
1602
|
-
<div class='inline'>
|
|
1603
|
-
<p>the current Gregorian day of the month (1-31).</p>
|
|
1604
|
-
</div>
|
|
1605
|
-
|
|
1606
|
-
</li>
|
|
1607
|
-
|
|
1608
|
-
</ul>
|
|
1609
|
-
|
|
1610
|
-
</div><table class="source_code">
|
|
1611
|
-
<tr>
|
|
1612
|
-
<td>
|
|
1613
|
-
<pre class="lines">
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
50
|
|
1617
|
-
51
|
|
1618
|
-
52</pre>
|
|
1619
|
-
</td>
|
|
1620
|
-
<td>
|
|
1621
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 50</span>
|
|
1622
|
-
|
|
1623
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_date'>date</span>
|
|
1624
|
-
<span class='ivar'>@date</span>
|
|
1625
|
-
<span class='kw'>end</span></pre>
|
|
1626
|
-
</td>
|
|
1627
|
-
</tr>
|
|
1628
|
-
</table>
|
|
1629
|
-
</div>
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
<span id=""></span>
|
|
1633
|
-
<div class="method_details ">
|
|
1634
|
-
<h3 class="signature " id="hebrew_date-instance_method">
|
|
1635
|
-
|
|
1636
|
-
- (<tt>Integer</tt>) <strong>hebrew_date</strong> <span class="extras">(readonly)</span>
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
</h3><div class="docstring">
|
|
1643
|
-
<div class="discussion">
|
|
1644
|
-
|
|
1645
|
-
<p>Returns the current Hebrew date (1-30).</p>
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
</div>
|
|
1649
|
-
</div>
|
|
1650
|
-
<div class="tags">
|
|
1651
|
-
|
|
1652
|
-
<p class="tag_title">Returns:</p>
|
|
1653
|
-
<ul class="return">
|
|
1654
|
-
|
|
1655
|
-
<li>
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
—
|
|
1663
|
-
<div class='inline'>
|
|
1664
|
-
<p>the current Hebrew date (1-30).</p>
|
|
1665
|
-
</div>
|
|
1666
|
-
|
|
1667
|
-
</li>
|
|
1668
|
-
|
|
1669
|
-
</ul>
|
|
1670
|
-
|
|
1671
|
-
</div><table class="source_code">
|
|
1672
|
-
<tr>
|
|
1673
|
-
<td>
|
|
1674
|
-
<pre class="lines">
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
59
|
|
1678
|
-
60
|
|
1679
|
-
61</pre>
|
|
1680
|
-
</td>
|
|
1681
|
-
<td>
|
|
1682
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 59</span>
|
|
1683
|
-
|
|
1684
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hebrew_date'>hebrew_date</span>
|
|
1685
|
-
<span class='ivar'>@hebrew_date</span>
|
|
1686
|
-
<span class='kw'>end</span></pre>
|
|
1687
|
-
</td>
|
|
1688
|
-
</tr>
|
|
1689
|
-
</table>
|
|
1690
|
-
</div>
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
<span id=""></span>
|
|
1694
|
-
<div class="method_details ">
|
|
1695
|
-
<h3 class="signature " id="hebrew_month-instance_method">
|
|
1696
|
-
|
|
1697
|
-
- (<tt>Integer</tt>) <strong>hebrew_month</strong> <span class="extras">(readonly)</span>
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
</h3><div class="docstring">
|
|
1704
|
-
<div class="discussion">
|
|
1705
|
-
|
|
1706
|
-
<p>Returns the current Hebrew month (1-13).</p>
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
</div>
|
|
1710
|
-
</div>
|
|
1711
|
-
<div class="tags">
|
|
1712
|
-
|
|
1713
|
-
<p class="tag_title">Returns:</p>
|
|
1714
|
-
<ul class="return">
|
|
1715
|
-
|
|
1716
|
-
<li>
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
—
|
|
1724
|
-
<div class='inline'>
|
|
1725
|
-
<p>the current Hebrew month (1-13).</p>
|
|
1726
|
-
</div>
|
|
1727
|
-
|
|
1728
|
-
</li>
|
|
1729
|
-
|
|
1730
|
-
</ul>
|
|
1731
|
-
|
|
1732
|
-
</div><table class="source_code">
|
|
1733
|
-
<tr>
|
|
1734
|
-
<td>
|
|
1735
|
-
<pre class="lines">
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
56
|
|
1739
|
-
57
|
|
1740
|
-
58</pre>
|
|
1741
|
-
</td>
|
|
1742
|
-
<td>
|
|
1743
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 56</span>
|
|
1744
|
-
|
|
1745
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hebrew_month'>hebrew_month</span>
|
|
1746
|
-
<span class='ivar'>@hebrew_month</span>
|
|
1747
|
-
<span class='kw'>end</span></pre>
|
|
1748
|
-
</td>
|
|
1749
|
-
</tr>
|
|
1750
|
-
</table>
|
|
1751
|
-
</div>
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
<span id=""></span>
|
|
1755
|
-
<div class="method_details ">
|
|
1756
|
-
<h3 class="signature " id="hebrew_year-instance_method">
|
|
1757
|
-
|
|
1758
|
-
- (<tt>Integer</tt>) <strong>hebrew_year</strong> <span class="extras">(readonly)</span>
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
</h3><div class="docstring">
|
|
1765
|
-
<div class="discussion">
|
|
1766
|
-
|
|
1767
|
-
<p>Returns the current Hebrew year (e.g. 5775).</p>
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
</div>
|
|
1771
|
-
</div>
|
|
1772
|
-
<div class="tags">
|
|
1773
|
-
|
|
1774
|
-
<p class="tag_title">Returns:</p>
|
|
1775
|
-
<ul class="return">
|
|
1776
|
-
|
|
1777
|
-
<li>
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
—
|
|
1785
|
-
<div class='inline'>
|
|
1786
|
-
<p>the current Hebrew year (e.g. 5775).</p>
|
|
1787
|
-
</div>
|
|
1788
|
-
|
|
1789
|
-
</li>
|
|
1790
|
-
|
|
1791
|
-
</ul>
|
|
1792
|
-
|
|
1793
|
-
</div><table class="source_code">
|
|
1794
|
-
<tr>
|
|
1795
|
-
<td>
|
|
1796
|
-
<pre class="lines">
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
53
|
|
1800
|
-
54
|
|
1801
|
-
55</pre>
|
|
1802
|
-
</td>
|
|
1803
|
-
<td>
|
|
1804
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 53</span>
|
|
1805
|
-
|
|
1806
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hebrew_year'>hebrew_year</span>
|
|
1807
|
-
<span class='ivar'>@hebrew_year</span>
|
|
1808
|
-
<span class='kw'>end</span></pre>
|
|
1809
|
-
</td>
|
|
1810
|
-
</tr>
|
|
1811
|
-
</table>
|
|
1812
|
-
</div>
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
<span id=""></span>
|
|
1816
|
-
<div class="method_details ">
|
|
1817
|
-
<h3 class="signature " id="month-instance_method">
|
|
1818
|
-
|
|
1819
|
-
- (<tt>Integer</tt>) <strong>month</strong> <span class="extras">(readonly)</span>
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
</h3><div class="docstring">
|
|
1826
|
-
<div class="discussion">
|
|
1827
|
-
|
|
1828
|
-
<p>Returns the current Gregorian month (1-12).</p>
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
</div>
|
|
1832
|
-
</div>
|
|
1833
|
-
<div class="tags">
|
|
1834
|
-
|
|
1835
|
-
<p class="tag_title">Returns:</p>
|
|
1836
|
-
<ul class="return">
|
|
1837
|
-
|
|
1838
|
-
<li>
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
—
|
|
1846
|
-
<div class='inline'>
|
|
1847
|
-
<p>the current Gregorian month (1-12).</p>
|
|
1848
|
-
</div>
|
|
1849
|
-
|
|
1850
|
-
</li>
|
|
1851
|
-
|
|
1852
|
-
</ul>
|
|
1853
|
-
|
|
1854
|
-
</div><table class="source_code">
|
|
1855
|
-
<tr>
|
|
1856
|
-
<td>
|
|
1857
|
-
<pre class="lines">
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
47
|
|
1861
|
-
48
|
|
1862
|
-
49</pre>
|
|
1863
|
-
</td>
|
|
1864
|
-
<td>
|
|
1865
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 47</span>
|
|
1866
|
-
|
|
1867
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_month'>month</span>
|
|
1868
|
-
<span class='ivar'>@month</span>
|
|
1869
|
-
<span class='kw'>end</span></pre>
|
|
1870
|
-
</td>
|
|
1871
|
-
</tr>
|
|
1872
|
-
</table>
|
|
1873
|
-
</div>
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
<span id=""></span>
|
|
1877
|
-
<div class="method_details ">
|
|
1878
|
-
<h3 class="signature " id="year-instance_method">
|
|
1879
|
-
|
|
1880
|
-
- (<tt>Integer</tt>) <strong>year</strong> <span class="extras">(readonly)</span>
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
</h3><div class="docstring">
|
|
1887
|
-
<div class="discussion">
|
|
1888
|
-
|
|
1889
|
-
<p>Returns the current Gregorian year (e.g. 2008).</p>
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
</div>
|
|
1893
|
-
</div>
|
|
1894
|
-
<div class="tags">
|
|
1895
|
-
|
|
1896
|
-
<p class="tag_title">Returns:</p>
|
|
1897
|
-
<ul class="return">
|
|
1898
|
-
|
|
1899
|
-
<li>
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
—
|
|
1907
|
-
<div class='inline'>
|
|
1908
|
-
<p>the current Gregorian year (e.g. 2008).</p>
|
|
1909
|
-
</div>
|
|
1910
|
-
|
|
1911
|
-
</li>
|
|
1912
|
-
|
|
1913
|
-
</ul>
|
|
1914
|
-
|
|
1915
|
-
</div><table class="source_code">
|
|
1916
|
-
<tr>
|
|
1917
|
-
<td>
|
|
1918
|
-
<pre class="lines">
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
44
|
|
1922
|
-
45
|
|
1923
|
-
46</pre>
|
|
1924
|
-
</td>
|
|
1925
|
-
<td>
|
|
1926
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 44</span>
|
|
1927
|
-
|
|
1928
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_year'>year</span>
|
|
1929
|
-
<span class='ivar'>@year</span>
|
|
1930
|
-
<span class='kw'>end</span></pre>
|
|
1931
|
-
</td>
|
|
1932
|
-
</tr>
|
|
1933
|
-
</table>
|
|
1934
|
-
</div>
|
|
1935
|
-
|
|
1936
|
-
</div>
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
<div id="class_method_details" class="method_details_list">
|
|
1940
|
-
<h2>Class Method Details</h2>
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
<div class="method_details first">
|
|
1944
|
-
<h3 class="signature first" id="day_name-class_method">
|
|
1945
|
-
|
|
1946
|
-
+ (<tt>String</tt>) <strong>day_name</strong>(day)
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
</h3><div class="docstring">
|
|
1953
|
-
<div class="discussion">
|
|
1954
|
-
|
|
1955
|
-
<p>Get the name of the given day (1-7).</p>
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
</div>
|
|
1959
|
-
</div>
|
|
1960
|
-
<div class="tags">
|
|
1961
|
-
<p class="tag_title">Parameters:</p>
|
|
1962
|
-
<ul class="param">
|
|
1963
|
-
|
|
1964
|
-
<li>
|
|
1965
|
-
|
|
1966
|
-
<span class='name'>day</span>
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
</li>
|
|
1974
|
-
|
|
1975
|
-
</ul>
|
|
1976
|
-
|
|
1977
|
-
<p class="tag_title">Returns:</p>
|
|
1978
|
-
<ul class="return">
|
|
1979
|
-
|
|
1980
|
-
<li>
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
</li>
|
|
1988
|
-
|
|
1989
|
-
</ul>
|
|
1990
|
-
|
|
1991
|
-
</div><table class="source_code">
|
|
1992
|
-
<tr>
|
|
1993
|
-
<td>
|
|
1994
|
-
<pre class="lines">
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
452
|
|
1998
|
-
453
|
|
1999
|
-
454
|
|
2000
|
-
455
|
|
2001
|
-
456
|
|
2002
|
-
457
|
|
2003
|
-
458</pre>
|
|
2004
|
-
</td>
|
|
2005
|
-
<td>
|
|
2006
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 452</span>
|
|
2007
|
-
|
|
2008
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_day_name'>day_name</span><span class='lparen'>(</span><span class='id identifier rubyid_day'>day</span><span class='rparen'>)</span>
|
|
2009
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_replace_saturday'>replace_saturday</span> <span class='op'>&&</span> <span class='id identifier rubyid_day'>day</span> <span class='op'>==</span> <span class='int'>7</span>
|
|
2010
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ashkenaz'>ashkenaz</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Shabbos</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Shabbat</span><span class='tstring_end'>'</span></span>
|
|
2011
|
-
<span class='kw'>else</span>
|
|
2012
|
-
<span class='const'>Date</span><span class='op'>::</span><span class='const'>DAYNAMES</span><span class='lbracket'>[</span><span class='id identifier rubyid_day'>day</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span>
|
|
2013
|
-
<span class='kw'>end</span>
|
|
2014
|
-
<span class='kw'>end</span></pre>
|
|
2015
|
-
</td>
|
|
2016
|
-
</tr>
|
|
2017
|
-
</table>
|
|
2018
|
-
</div>
|
|
2019
|
-
|
|
2020
|
-
<div class="method_details ">
|
|
2021
|
-
<h3 class="signature " id="hebrew_leap_year?-class_method">
|
|
2022
|
-
|
|
2023
|
-
+ (<tt>Boolean</tt>) <strong>hebrew_leap_year?</strong>(year)
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
</h3><div class="docstring">
|
|
2030
|
-
<div class="discussion">
|
|
2031
|
-
|
|
2032
|
-
<p>Is this a Hebrew leap year?</p>
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
</div>
|
|
2036
|
-
</div>
|
|
2037
|
-
<div class="tags">
|
|
2038
|
-
<p class="tag_title">Parameters:</p>
|
|
2039
|
-
<ul class="param">
|
|
2040
|
-
|
|
2041
|
-
<li>
|
|
2042
|
-
|
|
2043
|
-
<span class='name'>year</span>
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
—
|
|
2051
|
-
<div class='inline'>
|
|
2052
|
-
<p>the Hebrew year.</p>
|
|
2053
|
-
</div>
|
|
2054
|
-
|
|
2055
|
-
</li>
|
|
2056
|
-
|
|
2057
|
-
</ul>
|
|
2058
|
-
|
|
2059
|
-
<p class="tag_title">Returns:</p>
|
|
2060
|
-
<ul class="return">
|
|
2061
|
-
|
|
2062
|
-
<li>
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
</li>
|
|
2070
|
-
|
|
2071
|
-
</ul>
|
|
2072
|
-
|
|
2073
|
-
</div><table class="source_code">
|
|
2074
|
-
<tr>
|
|
2075
|
-
<td>
|
|
2076
|
-
<pre class="lines">
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
438
|
|
2080
|
-
439
|
|
2081
|
-
440</pre>
|
|
2082
|
-
</td>
|
|
2083
|
-
<td>
|
|
2084
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 438</span>
|
|
2085
|
-
|
|
2086
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
|
2087
|
-
<span class='lparen'>(</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='int'>7</span> <span class='op'>*</span> <span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_remainder'>remainder</span><span class='lparen'>(</span><span class='int'>19</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'><</span> <span class='int'>7</span>
|
|
2088
|
-
<span class='kw'>end</span></pre>
|
|
2089
|
-
</td>
|
|
2090
|
-
</tr>
|
|
2091
|
-
</table>
|
|
2092
|
-
</div>
|
|
2093
|
-
|
|
2094
|
-
<div class="method_details ">
|
|
2095
|
-
<h3 class="signature " id="hebrew_month_to_s-class_method">
|
|
2096
|
-
|
|
2097
|
-
+ (<tt>String</tt>) <strong>hebrew_month_to_s</strong>(month, year = nil)
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
</h3><div class="docstring">
|
|
2104
|
-
<div class="discussion">
|
|
2105
|
-
|
|
2106
|
-
<p>Get the name of the given Hebrew month.</p>
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
</div>
|
|
2110
|
-
</div>
|
|
2111
|
-
<div class="tags">
|
|
2112
|
-
<p class="tag_title">Parameters:</p>
|
|
2113
|
-
<ul class="param">
|
|
2114
|
-
|
|
2115
|
-
<li>
|
|
2116
|
-
|
|
2117
|
-
<span class='name'>month</span>
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
</li>
|
|
2125
|
-
|
|
2126
|
-
<li>
|
|
2127
|
-
|
|
2128
|
-
<span class='name'>year</span>
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
</li>
|
|
2138
|
-
|
|
2139
|
-
</ul>
|
|
2140
|
-
|
|
2141
|
-
<p class="tag_title">Returns:</p>
|
|
2142
|
-
<ul class="return">
|
|
2143
|
-
|
|
2144
|
-
<li>
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
</li>
|
|
2152
|
-
|
|
2153
|
-
</ul>
|
|
2154
|
-
|
|
2155
|
-
</div><table class="source_code">
|
|
2156
|
-
<tr>
|
|
2157
|
-
<td>
|
|
2158
|
-
<pre class="lines">
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
342
|
|
2162
|
-
343
|
|
2163
|
-
344
|
|
2164
|
-
345
|
|
2165
|
-
346
|
|
2166
|
-
347
|
|
2167
|
-
348
|
|
2168
|
-
349
|
|
2169
|
-
350
|
|
2170
|
-
351
|
|
2171
|
-
352
|
|
2172
|
-
353</pre>
|
|
2173
|
-
</td>
|
|
2174
|
-
<td>
|
|
2175
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 342</span>
|
|
2176
|
-
|
|
2177
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_year'>year</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
|
2178
|
-
<span class='id identifier rubyid_year'>year</span> <span class='op'>||=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_hebrew_year'>hebrew_year</span>
|
|
2179
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>12</span>
|
|
2180
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Adar I</span><span class='tstring_end'>'</span></span>
|
|
2181
|
-
<span class='kw'>else</span>
|
|
2182
|
-
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='const'>HEBREW_MONTH_NAMES</span><span class='lbracket'>[</span><span class='id identifier rubyid_month'>month</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span>
|
|
2183
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Teves</span><span class='tstring_end'>'</span></span> <span class='op'>&&</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ashkenaz'>ashkenaz</span>
|
|
2184
|
-
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Tevet</span><span class='tstring_end'>'</span></span>
|
|
2185
|
-
<span class='kw'>end</span>
|
|
2186
|
-
<span class='id identifier rubyid_name'>name</span>
|
|
2187
|
-
<span class='kw'>end</span>
|
|
2188
|
-
<span class='kw'>end</span></pre>
|
|
2189
|
-
</td>
|
|
2190
|
-
</tr>
|
|
2191
|
-
</table>
|
|
2192
|
-
</div>
|
|
2193
|
-
|
|
2194
|
-
<div class="method_details ">
|
|
2195
|
-
<h3 class="signature " id="last_month_of_hebrew_year-class_method">
|
|
2196
|
-
|
|
2197
|
-
+ (<tt>Integer</tt>) <strong>last_month_of_hebrew_year</strong>(year)
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
</h3><div class="docstring">
|
|
2204
|
-
<div class="discussion">
|
|
2205
|
-
|
|
2206
|
-
<p>The last month in the Hebrew year (12 or 13).</p>
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
</div>
|
|
2210
|
-
</div>
|
|
2211
|
-
<div class="tags">
|
|
2212
|
-
<p class="tag_title">Parameters:</p>
|
|
2213
|
-
<ul class="param">
|
|
2214
|
-
|
|
2215
|
-
<li>
|
|
2216
|
-
|
|
2217
|
-
<span class='name'>year</span>
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
—
|
|
2225
|
-
<div class='inline'>
|
|
2226
|
-
<p>the Hebrew year.</p>
|
|
2227
|
-
</div>
|
|
2228
|
-
|
|
2229
|
-
</li>
|
|
2230
|
-
|
|
2231
|
-
</ul>
|
|
2232
|
-
|
|
2233
|
-
<p class="tag_title">Returns:</p>
|
|
2234
|
-
<ul class="return">
|
|
2235
|
-
|
|
2236
|
-
<li>
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
</li>
|
|
2244
|
-
|
|
2245
|
-
</ul>
|
|
2246
|
-
|
|
2247
|
-
</div><table class="source_code">
|
|
2248
|
-
<tr>
|
|
2249
|
-
<td>
|
|
2250
|
-
<pre class="lines">
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
445
|
|
2254
|
-
446
|
|
2255
|
-
447</pre>
|
|
2256
|
-
</td>
|
|
2257
|
-
<td>
|
|
2258
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 445</span>
|
|
2259
|
-
|
|
2260
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
|
2261
|
-
<span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='int'>13</span> <span class='op'>:</span> <span class='int'>12</span>
|
|
2262
|
-
<span class='kw'>end</span></pre>
|
|
2263
|
-
</td>
|
|
2264
|
-
</tr>
|
|
2265
|
-
</table>
|
|
2266
|
-
</div>
|
|
2267
|
-
|
|
2268
|
-
<div class="method_details ">
|
|
2269
|
-
<h3 class="signature " id="new_from_hebrew-class_method">
|
|
2270
|
-
|
|
2271
|
-
+ (<tt>Object</tt>) <strong>new_from_hebrew</strong>(year, month, date)
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
</h3><div class="docstring">
|
|
2278
|
-
<div class="discussion">
|
|
2279
|
-
|
|
2280
|
-
<p>Create a HebrewDate with initialized Hebrew date values.</p>
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
</div>
|
|
2284
|
-
</div>
|
|
2285
|
-
<div class="tags">
|
|
2286
|
-
<p class="tag_title">Parameters:</p>
|
|
2287
|
-
<ul class="param">
|
|
2288
|
-
|
|
2289
|
-
<li>
|
|
2290
|
-
|
|
2291
|
-
<span class='name'>year</span>
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
—
|
|
2299
|
-
<div class='inline'>
|
|
2300
|
-
<p>the Hebrew year (e.g. 5774)</p>
|
|
2301
|
-
</div>
|
|
2302
|
-
|
|
2303
|
-
</li>
|
|
2304
|
-
|
|
2305
|
-
<li>
|
|
2306
|
-
|
|
2307
|
-
<span class='name'>month</span>
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
—
|
|
2315
|
-
<div class='inline'>
|
|
2316
|
-
<p>the Hebrew month (1-13)</p>
|
|
2317
|
-
</div>
|
|
2318
|
-
|
|
2319
|
-
</li>
|
|
2320
|
-
|
|
2321
|
-
<li>
|
|
2322
|
-
|
|
2323
|
-
<span class='name'>date</span>
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
—
|
|
2331
|
-
<div class='inline'>
|
|
2332
|
-
<p>the day of the Hebrew month (1-30)</p>
|
|
2333
|
-
</div>
|
|
2334
|
-
|
|
2335
|
-
</li>
|
|
2336
|
-
|
|
2337
|
-
</ul>
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
</div><table class="source_code">
|
|
2341
|
-
<tr>
|
|
2342
|
-
<td>
|
|
2343
|
-
<pre class="lines">
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
166
|
|
2347
|
-
167
|
|
2348
|
-
168
|
|
2349
|
-
169
|
|
2350
|
-
170
|
|
2351
|
-
171
|
|
2352
|
-
172
|
|
2353
|
-
173</pre>
|
|
2354
|
-
</td>
|
|
2355
|
-
<td>
|
|
2356
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 166</span>
|
|
2357
|
-
|
|
2358
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new_from_hebrew'>new_from_hebrew</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='rparen'>)</span>
|
|
2359
|
-
<span class='id identifier rubyid_d'>d</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
|
|
2360
|
-
<span class='ivar'>@year</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
2361
|
-
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
2362
|
-
<span class='ivar'>@date</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
2363
|
-
<span class='id identifier rubyid_d'>d</span><span class='period'>.</span><span class='id identifier rubyid_set_hebrew_date'>set_hebrew_date</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='comma'>,</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
|
2364
|
-
<span class='id identifier rubyid_d'>d</span>
|
|
2365
|
-
<span class='kw'>end</span></pre>
|
|
2366
|
-
</td>
|
|
2367
|
-
</tr>
|
|
2368
|
-
</table>
|
|
2369
|
-
</div>
|
|
2370
|
-
|
|
2371
|
-
</div>
|
|
2372
|
-
|
|
2373
|
-
<div id="instance_method_details" class="method_details_list">
|
|
2374
|
-
<h2>Instance Method Details</h2>
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
<div class="method_details first">
|
|
2378
|
-
<h3 class="signature first" id="+-instance_method">
|
|
2379
|
-
|
|
2380
|
-
- (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>+</strong>(other)
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
</h3><div class="docstring">
|
|
2387
|
-
<div class="discussion">
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
</div>
|
|
2391
|
-
</div>
|
|
2392
|
-
<div class="tags">
|
|
2393
|
-
<p class="tag_title">Parameters:</p>
|
|
2394
|
-
<ul class="param">
|
|
2395
|
-
|
|
2396
|
-
<li>
|
|
2397
|
-
|
|
2398
|
-
<span class='name'>other</span>
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
<span class='type'>(<tt>Fixnum</tt>)</span>
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
</li>
|
|
2406
|
-
|
|
2407
|
-
</ul>
|
|
2408
|
-
|
|
2409
|
-
<p class="tag_title">Returns:</p>
|
|
2410
|
-
<ul class="return">
|
|
2411
|
-
|
|
2412
|
-
<li>
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
</li>
|
|
2420
|
-
|
|
2421
|
-
</ul>
|
|
2422
|
-
|
|
2423
|
-
</div><table class="source_code">
|
|
2424
|
-
<tr>
|
|
2425
|
-
<td>
|
|
2426
|
-
<pre class="lines">
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
114
|
|
2430
|
-
115
|
|
2431
|
-
116
|
|
2432
|
-
117
|
|
2433
|
-
118
|
|
2434
|
-
119
|
|
2435
|
-
120</pre>
|
|
2436
|
-
</td>
|
|
2437
|
-
<td>
|
|
2438
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 114</span>
|
|
2439
|
-
|
|
2440
|
-
<span class='kw'>def</span> <span class='op'>+</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
|
2441
|
-
<span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span>
|
|
2442
|
-
<span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
2443
|
-
<span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_forward'>forward</span>
|
|
2444
|
-
<span class='kw'>end</span>
|
|
2445
|
-
<span class='id identifier rubyid_date'>date</span>
|
|
2446
|
-
<span class='kw'>end</span></pre>
|
|
2447
|
-
</td>
|
|
2448
|
-
</tr>
|
|
2449
|
-
</table>
|
|
2450
|
-
</div>
|
|
2451
|
-
|
|
2452
|
-
<div class="method_details ">
|
|
2453
|
-
<h3 class="signature " id="--instance_method">
|
|
2454
|
-
|
|
2455
|
-
- (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>-</strong>(other)
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
</h3><div class="docstring">
|
|
2462
|
-
<div class="discussion">
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
</div>
|
|
2466
|
-
</div>
|
|
2467
|
-
<div class="tags">
|
|
2468
|
-
<p class="tag_title">Parameters:</p>
|
|
2469
|
-
<ul class="param">
|
|
2470
|
-
|
|
2471
|
-
<li>
|
|
2472
|
-
|
|
2473
|
-
<span class='name'>other</span>
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
<span class='type'>(<tt>Fixnum</tt>)</span>
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
</li>
|
|
2481
|
-
|
|
2482
|
-
</ul>
|
|
2483
|
-
|
|
2484
|
-
<p class="tag_title">Returns:</p>
|
|
2485
|
-
<ul class="return">
|
|
2486
|
-
|
|
2487
|
-
<li>
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
</li>
|
|
2495
|
-
|
|
2496
|
-
</ul>
|
|
2497
|
-
|
|
2498
|
-
</div><table class="source_code">
|
|
2499
|
-
<tr>
|
|
2500
|
-
<td>
|
|
2501
|
-
<pre class="lines">
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
124
|
|
2505
|
-
125
|
|
2506
|
-
126
|
|
2507
|
-
127
|
|
2508
|
-
128
|
|
2509
|
-
129
|
|
2510
|
-
130</pre>
|
|
2511
|
-
</td>
|
|
2512
|
-
<td>
|
|
2513
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 124</span>
|
|
2514
|
-
|
|
2515
|
-
<span class='kw'>def</span> <span class='op'>-</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
|
2516
|
-
<span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_clone'>clone</span>
|
|
2517
|
-
<span class='lparen'>(</span><span class='int'>1</span><span class='op'>..</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
|
|
2518
|
-
<span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_back'>back</span>
|
|
2519
|
-
<span class='kw'>end</span>
|
|
2520
|
-
<span class='id identifier rubyid_date'>date</span>
|
|
2521
|
-
<span class='kw'>end</span></pre>
|
|
2522
|
-
</td>
|
|
2523
|
-
</tr>
|
|
2524
|
-
</table>
|
|
2525
|
-
</div>
|
|
2526
|
-
|
|
2527
|
-
<div class="method_details ">
|
|
2528
|
-
<h3 class="signature " id="<=>-instance_method">
|
|
2529
|
-
|
|
2530
|
-
- (<tt>Integer</tt>) <strong><=></strong>(other)
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
</h3><div class="docstring">
|
|
2537
|
-
<div class="discussion">
|
|
2538
|
-
|
|
2539
|
-
<p>Comparison operator.</p>
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
</div>
|
|
2543
|
-
</div>
|
|
2544
|
-
<div class="tags">
|
|
2545
|
-
<p class="tag_title">Parameters:</p>
|
|
2546
|
-
<ul class="param">
|
|
2547
|
-
|
|
2548
|
-
<li>
|
|
2549
|
-
|
|
2550
|
-
<span class='name'>other</span>
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
</li>
|
|
2558
|
-
|
|
2559
|
-
</ul>
|
|
2560
|
-
|
|
2561
|
-
<p class="tag_title">Returns:</p>
|
|
2562
|
-
<ul class="return">
|
|
2563
|
-
|
|
2564
|
-
<li>
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
—
|
|
2572
|
-
<div class='inline'>
|
|
2573
|
-
<p>-1, 0, or 1</p>
|
|
2574
|
-
</div>
|
|
2575
|
-
|
|
2576
|
-
</li>
|
|
2577
|
-
|
|
2578
|
-
</ul>
|
|
2579
|
-
|
|
2580
|
-
</div><table class="source_code">
|
|
2581
|
-
<tr>
|
|
2582
|
-
<td>
|
|
2583
|
-
<pre class="lines">
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
135
|
|
2587
|
-
136
|
|
2588
|
-
137</pre>
|
|
2589
|
-
</td>
|
|
2590
|
-
<td>
|
|
2591
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 135</span>
|
|
2592
|
-
|
|
2593
|
-
<span class='kw'>def</span> <span class='op'><=></span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
|
2594
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span> <span class='op'><=></span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span>
|
|
2595
|
-
<span class='kw'>end</span></pre>
|
|
2596
|
-
</td>
|
|
2597
|
-
</tr>
|
|
2598
|
-
</table>
|
|
2599
|
-
</div>
|
|
2600
|
-
|
|
2601
|
-
<div class="method_details ">
|
|
2602
|
-
<h3 class="signature " id="__getobj__-instance_method">
|
|
2603
|
-
|
|
2604
|
-
- (<tt>Object</tt>) <strong>__getobj__</strong>
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
</h3><table class="source_code">
|
|
2611
|
-
<tr>
|
|
2612
|
-
<td>
|
|
2613
|
-
<pre class="lines">
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
103
|
|
2617
|
-
104
|
|
2618
|
-
105</pre>
|
|
2619
|
-
</td>
|
|
2620
|
-
<td>
|
|
2621
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 103</span>
|
|
2622
|
-
|
|
2623
|
-
<span class='kw'>def</span> <span class='id identifier rubyid___getobj__'>__getobj__</span>
|
|
2624
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span>
|
|
2625
|
-
<span class='kw'>end</span></pre>
|
|
2626
|
-
</td>
|
|
2627
|
-
</tr>
|
|
2628
|
-
</table>
|
|
2629
|
-
</div>
|
|
2630
|
-
|
|
2631
|
-
<div class="method_details ">
|
|
2632
|
-
<h3 class="signature " id="__setobj__-instance_method">
|
|
2633
|
-
|
|
2634
|
-
- (<tt>Object</tt>) <strong>__setobj__</strong>(obj)
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
</h3><table class="source_code">
|
|
2641
|
-
<tr>
|
|
2642
|
-
<td>
|
|
2643
|
-
<pre class="lines">
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
108
|
|
2647
|
-
109
|
|
2648
|
-
110</pre>
|
|
2649
|
-
</td>
|
|
2650
|
-
<td>
|
|
2651
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 108</span>
|
|
2652
|
-
|
|
2653
|
-
<span class='kw'>def</span> <span class='id identifier rubyid___setobj__'>__setobj__</span><span class='lparen'>(</span><span class='id identifier rubyid_obj'>obj</span><span class='rparen'>)</span>
|
|
2654
|
-
<span class='comment'># do nothing
|
|
2655
|
-
</span><span class='kw'>end</span></pre>
|
|
2656
|
-
</td>
|
|
2657
|
-
</tr>
|
|
2658
|
-
</table>
|
|
2659
|
-
</div>
|
|
2660
|
-
|
|
2661
|
-
<div class="method_details ">
|
|
2662
|
-
<h3 class="signature " id="back-instance_method">
|
|
2663
|
-
|
|
2664
|
-
- (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>back</strong>
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
</h3><div class="docstring">
|
|
2671
|
-
<div class="discussion">
|
|
2672
|
-
|
|
2673
|
-
<p>Move back one day.</p>
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
</div>
|
|
2677
|
-
</div>
|
|
2678
|
-
<div class="tags">
|
|
2679
|
-
|
|
2680
|
-
<p class="tag_title">Returns:</p>
|
|
2681
|
-
<ul class="return">
|
|
2682
|
-
|
|
2683
|
-
<li>
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
—
|
|
2691
|
-
<div class='inline'>
|
|
2692
|
-
<p>the same HebrewDate object again, for chaining.</p>
|
|
2693
|
-
</div>
|
|
2694
|
-
|
|
2695
|
-
</li>
|
|
2696
|
-
|
|
2697
|
-
</ul>
|
|
2698
|
-
|
|
2699
|
-
</div><table class="source_code">
|
|
2700
|
-
<tr>
|
|
2701
|
-
<td>
|
|
2702
|
-
<pre class="lines">
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
295
|
|
2706
|
-
296
|
|
2707
|
-
297
|
|
2708
|
-
298
|
|
2709
|
-
299
|
|
2710
|
-
300
|
|
2711
|
-
301
|
|
2712
|
-
302
|
|
2713
|
-
303
|
|
2714
|
-
304
|
|
2715
|
-
305
|
|
2716
|
-
306
|
|
2717
|
-
307
|
|
2718
|
-
308
|
|
2719
|
-
309
|
|
2720
|
-
310
|
|
2721
|
-
311
|
|
2722
|
-
312
|
|
2723
|
-
313
|
|
2724
|
-
314
|
|
2725
|
-
315
|
|
2726
|
-
316
|
|
2727
|
-
317
|
|
2728
|
-
318
|
|
2729
|
-
319
|
|
2730
|
-
320
|
|
2731
|
-
321
|
|
2732
|
-
322
|
|
2733
|
-
323
|
|
2734
|
-
324
|
|
2735
|
-
325
|
|
2736
|
-
326
|
|
2737
|
-
327
|
|
2738
|
-
328
|
|
2739
|
-
329
|
|
2740
|
-
330</pre>
|
|
2741
|
-
</td>
|
|
2742
|
-
<td>
|
|
2743
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 295</span>
|
|
2744
|
-
|
|
2745
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_back'>back</span>
|
|
2746
|
-
<span class='comment'># Change Gregorian date
|
|
2747
|
-
</span> <span class='kw'>if</span> <span class='ivar'>@date</span> <span class='op'>==</span> <span class='int'>1</span>
|
|
2748
|
-
<span class='kw'>if</span> <span class='ivar'>@month</span> <span class='op'>==</span> <span class='int'>1</span>
|
|
2749
|
-
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='int'>12</span>
|
|
2750
|
-
<span class='ivar'>@year</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2751
|
-
<span class='kw'>else</span>
|
|
2752
|
-
<span class='ivar'>@month</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2753
|
-
<span class='kw'>end</span>
|
|
2754
|
-
|
|
2755
|
-
<span class='comment'># change to last day of previous month
|
|
2756
|
-
</span> <span class='ivar'>@date</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day_of_month'>last_day_of_month</span>
|
|
2757
|
-
<span class='kw'>else</span>
|
|
2758
|
-
<span class='ivar'>@date</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2759
|
-
<span class='kw'>end</span>
|
|
2760
|
-
|
|
2761
|
-
<span class='comment'># Change Hebrew date
|
|
2762
|
-
</span> <span class='kw'>if</span> <span class='ivar'>@hebrew_date</span> <span class='op'>==</span> <span class='int'>1</span>
|
|
2763
|
-
<span class='kw'>if</span> <span class='ivar'>@hebrew_month</span> <span class='op'>==</span> <span class='int'>1</span> <span class='comment'># Nisan
|
|
2764
|
-
</span> <span class='ivar'>@hebrew_month</span> <span class='op'>=</span> <span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span>
|
|
2765
|
-
<span class='kw'>elsif</span> <span class='ivar'>@hebrew_month</span> <span class='op'>==</span> <span class='int'>7</span> <span class='comment'># Rosh Hashana
|
|
2766
|
-
</span> <span class='ivar'>@hebrew_year</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2767
|
-
<span class='ivar'>@hebrew_month</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2768
|
-
<span class='kw'>else</span>
|
|
2769
|
-
<span class='ivar'>@hebrew_month</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2770
|
-
<span class='kw'>end</span>
|
|
2771
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day_of_hebrew_month'>last_day_of_hebrew_month</span>
|
|
2772
|
-
<span class='kw'>else</span>
|
|
2773
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2774
|
-
<span class='kw'>end</span>
|
|
2775
|
-
|
|
2776
|
-
<span class='comment'># Change the absolute date
|
|
2777
|
-
</span> <span class='ivar'>@abs_date</span> <span class='op'>-=</span> <span class='int'>1</span>
|
|
2778
|
-
|
|
2779
|
-
<span class='kw'>self</span>
|
|
2780
|
-
<span class='kw'>end</span></pre>
|
|
2781
|
-
</td>
|
|
2782
|
-
</tr>
|
|
2783
|
-
</table>
|
|
2784
|
-
</div>
|
|
2785
|
-
|
|
2786
|
-
<div class="method_details ">
|
|
2787
|
-
<h3 class="signature " id="day-instance_method">
|
|
2788
|
-
|
|
2789
|
-
- (<tt>Integer</tt>) <strong>day</strong>
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
</h3><div class="docstring">
|
|
2796
|
-
<div class="discussion">
|
|
2797
|
-
|
|
2798
|
-
<p>Get the day of the week.</p>
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
</div>
|
|
2802
|
-
</div>
|
|
2803
|
-
<div class="tags">
|
|
2804
|
-
|
|
2805
|
-
<p class="tag_title">Returns:</p>
|
|
2806
|
-
<ul class="return">
|
|
2807
|
-
|
|
2808
|
-
<li>
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
—
|
|
2816
|
-
<div class='inline'>
|
|
2817
|
-
<p>the day of the week, 1-7.</p>
|
|
2818
|
-
</div>
|
|
2819
|
-
|
|
2820
|
-
</li>
|
|
2821
|
-
|
|
2822
|
-
</ul>
|
|
2823
|
-
|
|
2824
|
-
</div><table class="source_code">
|
|
2825
|
-
<tr>
|
|
2826
|
-
<td>
|
|
2827
|
-
<pre class="lines">
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
410
|
|
2831
|
-
411
|
|
2832
|
-
412</pre>
|
|
2833
|
-
</td>
|
|
2834
|
-
<td>
|
|
2835
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 410</span>
|
|
2836
|
-
|
|
2837
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_day'>day</span>
|
|
2838
|
-
<span class='id identifier rubyid_to_date'>to_date</span><span class='period'>.</span><span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%w</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>+</span> <span class='int'>1</span>
|
|
2839
|
-
<span class='kw'>end</span></pre>
|
|
2840
|
-
</td>
|
|
2841
|
-
</tr>
|
|
2842
|
-
</table>
|
|
2843
|
-
</div>
|
|
2844
|
-
|
|
2845
|
-
<div class="method_details ">
|
|
2846
|
-
<h3 class="signature " id="downto-instance_method">
|
|
2847
|
-
|
|
2848
|
-
- (<tt>Enumerator|self</tt>) <strong>downto</strong>(min, &block)
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
</h3><div class="docstring">
|
|
2855
|
-
<div class="discussion">
|
|
2856
|
-
|
|
2857
|
-
<p>This method is equivalent to step(min, -1){|date| …}.</p>
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
</div>
|
|
2861
|
-
</div>
|
|
2862
|
-
<div class="tags">
|
|
2863
|
-
<p class="tag_title">Parameters:</p>
|
|
2864
|
-
<ul class="param">
|
|
2865
|
-
|
|
2866
|
-
<li>
|
|
2867
|
-
|
|
2868
|
-
<span class='name'>min</span>
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
</li>
|
|
2876
|
-
|
|
2877
|
-
</ul>
|
|
2878
|
-
|
|
2879
|
-
<p class="tag_title">Returns:</p>
|
|
2880
|
-
<ul class="return">
|
|
2881
|
-
|
|
2882
|
-
<li>
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
<span class='type'>(<tt>Enumerator|self</tt>)</span>
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
</li>
|
|
2890
|
-
|
|
2891
|
-
</ul>
|
|
2892
|
-
|
|
2893
|
-
</div><table class="source_code">
|
|
2894
|
-
<tr>
|
|
2895
|
-
<td>
|
|
2896
|
-
<pre class="lines">
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
149
|
|
2900
|
-
150
|
|
2901
|
-
151
|
|
2902
|
-
152</pre>
|
|
2903
|
-
</td>
|
|
2904
|
-
<td>
|
|
2905
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 149</span>
|
|
2906
|
-
|
|
2907
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_downto'>downto</span><span class='lparen'>(</span><span class='id identifier rubyid_min'>min</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
2908
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_to_enum'>to_enum</span><span class='lparen'>(</span><span class='symbol'>:downto</span><span class='comma'>,</span> <span class='id identifier rubyid_min'>min</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
2909
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span><span class='id identifier rubyid_min'>min</span><span class='comma'>,</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
2910
|
-
<span class='kw'>end</span></pre>
|
|
2911
|
-
</td>
|
|
2912
|
-
</tr>
|
|
2913
|
-
</table>
|
|
2914
|
-
</div>
|
|
2915
|
-
|
|
2916
|
-
<div class="method_details ">
|
|
2917
|
-
<h3 class="signature " id="forward-instance_method">
|
|
2918
|
-
|
|
2919
|
-
- (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>forward</strong>
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
</h3><div class="docstring">
|
|
2926
|
-
<div class="discussion">
|
|
2927
|
-
|
|
2928
|
-
<p>Move forward one day.</p>
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
</div>
|
|
2932
|
-
</div>
|
|
2933
|
-
<div class="tags">
|
|
2934
|
-
|
|
2935
|
-
<p class="tag_title">Returns:</p>
|
|
2936
|
-
<ul class="return">
|
|
2937
|
-
|
|
2938
|
-
<li>
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
—
|
|
2946
|
-
<div class='inline'>
|
|
2947
|
-
<p>the same HebrewDate object again, for chaining.</p>
|
|
2948
|
-
</div>
|
|
2949
|
-
|
|
2950
|
-
</li>
|
|
2951
|
-
|
|
2952
|
-
</ul>
|
|
2953
|
-
|
|
2954
|
-
</div><table class="source_code">
|
|
2955
|
-
<tr>
|
|
2956
|
-
<td>
|
|
2957
|
-
<pre class="lines">
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
242
|
|
2961
|
-
243
|
|
2962
|
-
244
|
|
2963
|
-
245
|
|
2964
|
-
246
|
|
2965
|
-
247
|
|
2966
|
-
248
|
|
2967
|
-
249
|
|
2968
|
-
250
|
|
2969
|
-
251
|
|
2970
|
-
252
|
|
2971
|
-
253
|
|
2972
|
-
254
|
|
2973
|
-
255
|
|
2974
|
-
256
|
|
2975
|
-
257
|
|
2976
|
-
258
|
|
2977
|
-
259
|
|
2978
|
-
260
|
|
2979
|
-
261
|
|
2980
|
-
262
|
|
2981
|
-
263
|
|
2982
|
-
264
|
|
2983
|
-
265
|
|
2984
|
-
266
|
|
2985
|
-
267
|
|
2986
|
-
268
|
|
2987
|
-
269
|
|
2988
|
-
270
|
|
2989
|
-
271
|
|
2990
|
-
272
|
|
2991
|
-
273
|
|
2992
|
-
274
|
|
2993
|
-
275
|
|
2994
|
-
276
|
|
2995
|
-
277
|
|
2996
|
-
278
|
|
2997
|
-
279
|
|
2998
|
-
280
|
|
2999
|
-
281
|
|
3000
|
-
282
|
|
3001
|
-
283</pre>
|
|
3002
|
-
</td>
|
|
3003
|
-
<td>
|
|
3004
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 242</span>
|
|
3005
|
-
|
|
3006
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_forward'>forward</span>
|
|
3007
|
-
<span class='comment'># Change Gregorian date
|
|
3008
|
-
</span> <span class='kw'>if</span> <span class='ivar'>@date</span> <span class='op'>==</span> <span class='id identifier rubyid_last_day_of_month'>last_day_of_month</span>
|
|
3009
|
-
<span class='kw'>if</span> <span class='ivar'>@month</span> <span class='op'>==</span> <span class='int'>12</span>
|
|
3010
|
-
<span class='comment'># last day of year
|
|
3011
|
-
</span> <span class='ivar'>@year</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3012
|
-
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3013
|
-
<span class='ivar'>@date</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3014
|
-
<span class='kw'>else</span>
|
|
3015
|
-
<span class='ivar'>@month</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3016
|
-
<span class='ivar'>@date</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3017
|
-
<span class='kw'>end</span>
|
|
3018
|
-
<span class='kw'>else</span>
|
|
3019
|
-
<span class='comment'># if not last day of month
|
|
3020
|
-
</span> <span class='ivar'>@date</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3021
|
-
<span class='kw'>end</span>
|
|
3022
|
-
|
|
3023
|
-
<span class='comment'># Change Hebrew date
|
|
3024
|
-
</span> <span class='kw'>if</span> <span class='ivar'>@hebrew_date</span> <span class='op'>==</span> <span class='id identifier rubyid_last_day_of_hebrew_month'>last_day_of_hebrew_month</span>
|
|
3025
|
-
<span class='kw'>if</span> <span class='ivar'>@hebrew_month</span> <span class='op'>==</span> <span class='int'>6</span>
|
|
3026
|
-
<span class='comment'># last day of Elul (i.e. last day of Hebrew year)
|
|
3027
|
-
</span> <span class='ivar'>@hebrew_year</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3028
|
-
<span class='ivar'>@hebrew_month</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3029
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3030
|
-
<span class='kw'>elsif</span> <span class='ivar'>@hebrew_month</span> <span class='op'>==</span> <span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span>
|
|
3031
|
-
<span class='comment'># last day of Adar or Adar II
|
|
3032
|
-
</span> <span class='ivar'>@hebrew_month</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3033
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3034
|
-
<span class='kw'>else</span>
|
|
3035
|
-
<span class='ivar'>@hebrew_month</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3036
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>=</span> <span class='int'>1</span>
|
|
3037
|
-
<span class='kw'>end</span>
|
|
3038
|
-
<span class='kw'>else</span>
|
|
3039
|
-
<span class='comment'># not last day of month
|
|
3040
|
-
</span> <span class='ivar'>@hebrew_date</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3041
|
-
<span class='kw'>end</span>
|
|
3042
|
-
|
|
3043
|
-
<span class='comment'># increment the absolute date
|
|
3044
|
-
</span> <span class='ivar'>@abs_date</span> <span class='op'>+=</span> <span class='int'>1</span>
|
|
3045
|
-
|
|
3046
|
-
<span class='kw'>self</span>
|
|
3047
|
-
<span class='kw'>end</span></pre>
|
|
3048
|
-
</td>
|
|
3049
|
-
</tr>
|
|
3050
|
-
</table>
|
|
3051
|
-
</div>
|
|
3052
|
-
|
|
3053
|
-
<div class="method_details ">
|
|
3054
|
-
<h3 class="signature " id="hebrew_leap_year?-instance_method">
|
|
3055
|
-
|
|
3056
|
-
- (<tt>Boolean</tt>) <strong>hebrew_leap_year?</strong>
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
</h3><div class="docstring">
|
|
3063
|
-
<div class="discussion">
|
|
3064
|
-
|
|
3065
|
-
<p>Is this a Hebrew leap year?</p>
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
</div>
|
|
3069
|
-
</div>
|
|
3070
|
-
<div class="tags">
|
|
3071
|
-
|
|
3072
|
-
<p class="tag_title">Returns:</p>
|
|
3073
|
-
<ul class="return">
|
|
3074
|
-
|
|
3075
|
-
<li>
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
</li>
|
|
3083
|
-
|
|
3084
|
-
</ul>
|
|
3085
|
-
|
|
3086
|
-
</div><table class="source_code">
|
|
3087
|
-
<tr>
|
|
3088
|
-
<td>
|
|
3089
|
-
<pre class="lines">
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
470
|
|
3093
|
-
471
|
|
3094
|
-
472</pre>
|
|
3095
|
-
</td>
|
|
3096
|
-
<td>
|
|
3097
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 470</span>
|
|
3098
|
-
|
|
3099
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span>
|
|
3100
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span><span class='lparen'>(</span><span class='ivar'>@hebrew_year</span><span class='rparen'>)</span>
|
|
3101
|
-
<span class='kw'>end</span></pre>
|
|
3102
|
-
</td>
|
|
3103
|
-
</tr>
|
|
3104
|
-
</table>
|
|
3105
|
-
</div>
|
|
3106
|
-
|
|
3107
|
-
<div class="method_details ">
|
|
3108
|
-
<h3 class="signature " id="hebrew_month_to_s-instance_method">
|
|
3109
|
-
|
|
3110
|
-
- (<tt>String</tt>) <strong>hebrew_month_to_s</strong>
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
</h3><div class="docstring">
|
|
3117
|
-
<div class="discussion">
|
|
3118
|
-
|
|
3119
|
-
<p>Get the name of the current Hebrew month.</p>
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
</div>
|
|
3123
|
-
</div>
|
|
3124
|
-
<div class="tags">
|
|
3125
|
-
|
|
3126
|
-
<p class="tag_title">Returns:</p>
|
|
3127
|
-
<ul class="return">
|
|
3128
|
-
|
|
3129
|
-
<li>
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
</li>
|
|
3137
|
-
|
|
3138
|
-
</ul>
|
|
3139
|
-
|
|
3140
|
-
</div><table class="source_code">
|
|
3141
|
-
<tr>
|
|
3142
|
-
<td>
|
|
3143
|
-
<pre class="lines">
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
334
|
|
3147
|
-
335
|
|
3148
|
-
336</pre>
|
|
3149
|
-
</td>
|
|
3150
|
-
<td>
|
|
3151
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 334</span>
|
|
3152
|
-
|
|
3153
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span>
|
|
3154
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='lparen'>(</span><span class='ivar'>@hebrew_month</span><span class='comma'>,</span> <span class='ivar'>@hebrew_year</span><span class='rparen'>)</span>
|
|
3155
|
-
<span class='kw'>end</span></pre>
|
|
3156
|
-
</td>
|
|
3157
|
-
</tr>
|
|
3158
|
-
</table>
|
|
3159
|
-
</div>
|
|
3160
|
-
|
|
3161
|
-
<div class="method_details ">
|
|
3162
|
-
<h3 class="signature " id="inspect-instance_method">
|
|
3163
|
-
|
|
3164
|
-
- (<tt>Object</tt>) <strong>inspect</strong>
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
</h3><table class="source_code">
|
|
3171
|
-
<tr>
|
|
3172
|
-
<td>
|
|
3173
|
-
<pre class="lines">
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
90
|
|
3177
|
-
91
|
|
3178
|
-
92</pre>
|
|
3179
|
-
</td>
|
|
3180
|
-
<td>
|
|
3181
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 90</span>
|
|
3182
|
-
|
|
3183
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
|
3184
|
-
<span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*Y-*-m-*-d (%Y-%-m-%-d)</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
3185
|
-
<span class='kw'>end</span></pre>
|
|
3186
|
-
</td>
|
|
3187
|
-
</tr>
|
|
3188
|
-
</table>
|
|
3189
|
-
</div>
|
|
3190
|
-
|
|
3191
|
-
<div class="method_details ">
|
|
3192
|
-
<h3 class="signature " id="last_day_of_hebrew_month-instance_method">
|
|
3193
|
-
|
|
3194
|
-
- (<tt>Integer</tt>) <strong>last_day_of_hebrew_month</strong>(month = nil)
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
</h3><div class="docstring">
|
|
3201
|
-
<div class="discussion">
|
|
3202
|
-
|
|
3203
|
-
<p>Last day of the current Hebrew month.</p>
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
</div>
|
|
3207
|
-
</div>
|
|
3208
|
-
<div class="tags">
|
|
3209
|
-
<p class="tag_title">Parameters:</p>
|
|
3210
|
-
<ul class="param">
|
|
3211
|
-
|
|
3212
|
-
<li>
|
|
3213
|
-
|
|
3214
|
-
<span class='name'>month</span>
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
—
|
|
3224
|
-
<div class='inline'>
|
|
3225
|
-
<p>Used internally.</p>
|
|
3226
|
-
</div>
|
|
3227
|
-
|
|
3228
|
-
</li>
|
|
3229
|
-
|
|
3230
|
-
</ul>
|
|
3231
|
-
|
|
3232
|
-
<p class="tag_title">Returns:</p>
|
|
3233
|
-
<ul class="return">
|
|
3234
|
-
|
|
3235
|
-
<li>
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
</li>
|
|
3243
|
-
|
|
3244
|
-
</ul>
|
|
3245
|
-
|
|
3246
|
-
</div><table class="source_code">
|
|
3247
|
-
<tr>
|
|
3248
|
-
<td>
|
|
3249
|
-
<pre class="lines">
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
477
|
|
3253
|
-
478
|
|
3254
|
-
479
|
|
3255
|
-
480
|
|
3256
|
-
481
|
|
3257
|
-
482
|
|
3258
|
-
483
|
|
3259
|
-
484
|
|
3260
|
-
485
|
|
3261
|
-
486
|
|
3262
|
-
487
|
|
3263
|
-
488
|
|
3264
|
-
489
|
|
3265
|
-
490
|
|
3266
|
-
491</pre>
|
|
3267
|
-
</td>
|
|
3268
|
-
<td>
|
|
3269
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 477</span>
|
|
3270
|
-
|
|
3271
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_last_day_of_hebrew_month'>last_day_of_hebrew_month</span><span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
|
3272
|
-
<span class='id identifier rubyid_month'>month</span> <span class='op'>||=</span> <span class='ivar'>@hebrew_month</span>
|
|
3273
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>||</span>
|
|
3274
|
-
<span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>4</span> <span class='op'>||</span>
|
|
3275
|
-
<span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>6</span> <span class='op'>||</span>
|
|
3276
|
-
<span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>8</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid__cheshvan_long?'>_cheshvan_long?</span><span class='rparen'>)</span> <span class='op'>||</span>
|
|
3277
|
-
<span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>9</span> <span class='op'>&&</span> <span class='id identifier rubyid__kislev_short?'>_kislev_short?</span><span class='rparen'>)</span> <span class='op'>||</span>
|
|
3278
|
-
<span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>10</span> <span class='op'>||</span>
|
|
3279
|
-
<span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>12</span> <span class='op'>&&</span> <span class='op'>!</span><span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span><span class='rparen'>)</span> <span class='op'>||</span>
|
|
3280
|
-
<span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>13</span>
|
|
3281
|
-
<span class='int'>29</span>
|
|
3282
|
-
<span class='kw'>else</span>
|
|
3283
|
-
<span class='int'>30</span>
|
|
3284
|
-
<span class='kw'>end</span>
|
|
3285
|
-
<span class='kw'>end</span></pre>
|
|
3286
|
-
</td>
|
|
3287
|
-
</tr>
|
|
3288
|
-
</table>
|
|
3289
|
-
</div>
|
|
3290
|
-
|
|
3291
|
-
<div class="method_details ">
|
|
3292
|
-
<h3 class="signature " id="last_day_of_month-instance_method">
|
|
3293
|
-
|
|
3294
|
-
- (<tt>Integer</tt>) <strong>last_day_of_month</strong>(month = nil)
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
</h3><div class="docstring">
|
|
3301
|
-
<div class="discussion">
|
|
3302
|
-
|
|
3303
|
-
<p>The last day of the Gregorian month.</p>
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
</div>
|
|
3307
|
-
</div>
|
|
3308
|
-
<div class="tags">
|
|
3309
|
-
<p class="tag_title">Parameters:</p>
|
|
3310
|
-
<ul class="param">
|
|
3311
|
-
|
|
3312
|
-
<li>
|
|
3313
|
-
|
|
3314
|
-
<span class='name'>month</span>
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
—
|
|
3324
|
-
<div class='inline'>
|
|
3325
|
-
<p>Used internally.</p>
|
|
3326
|
-
</div>
|
|
3327
|
-
|
|
3328
|
-
</li>
|
|
3329
|
-
|
|
3330
|
-
</ul>
|
|
3331
|
-
|
|
3332
|
-
<p class="tag_title">Returns:</p>
|
|
3333
|
-
<ul class="return">
|
|
3334
|
-
|
|
3335
|
-
<li>
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
</li>
|
|
3343
|
-
|
|
3344
|
-
</ul>
|
|
3345
|
-
|
|
3346
|
-
</div><table class="source_code">
|
|
3347
|
-
<tr>
|
|
3348
|
-
<td>
|
|
3349
|
-
<pre class="lines">
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
417
|
|
3353
|
-
418
|
|
3354
|
-
419
|
|
3355
|
-
420
|
|
3356
|
-
421
|
|
3357
|
-
422
|
|
3358
|
-
423
|
|
3359
|
-
424
|
|
3360
|
-
425
|
|
3361
|
-
426
|
|
3362
|
-
427
|
|
3363
|
-
428
|
|
3364
|
-
429
|
|
3365
|
-
430
|
|
3366
|
-
431
|
|
3367
|
-
432</pre>
|
|
3368
|
-
</td>
|
|
3369
|
-
<td>
|
|
3370
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 417</span>
|
|
3371
|
-
|
|
3372
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_last_day_of_month'>last_day_of_month</span><span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span><span class='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
|
|
3373
|
-
<span class='id identifier rubyid_month'>month</span> <span class='op'>||=</span> <span class='ivar'>@month</span>
|
|
3374
|
-
<span class='kw'>case</span> <span class='id identifier rubyid_month'>month</span>
|
|
3375
|
-
<span class='kw'>when</span> <span class='int'>2</span>
|
|
3376
|
-
<span class='kw'>if</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='ivar'>@year</span><span class='period'>.</span><span class='id identifier rubyid_remainder'>remainder</span><span class='lparen'>(</span><span class='int'>4</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='int'>0</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='lparen'>(</span><span class='ivar'>@year</span><span class='period'>.</span><span class='id identifier rubyid_remainder'>remainder</span><span class='lparen'>(</span><span class='int'>100</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>!=</span> <span class='int'>0</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>||</span>
|
|
3377
|
-
<span class='lparen'>(</span><span class='lparen'>(</span><span class='ivar'>@year</span><span class='period'>.</span><span class='id identifier rubyid_remainder'>remainder</span><span class='lparen'>(</span><span class='int'>400</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='int'>0</span><span class='rparen'>)</span>
|
|
3378
|
-
<span class='int'>29</span>
|
|
3379
|
-
<span class='kw'>else</span>
|
|
3380
|
-
<span class='int'>28</span>
|
|
3381
|
-
<span class='kw'>end</span>
|
|
3382
|
-
<span class='kw'>when</span> <span class='int'>4</span><span class='comma'>,</span> <span class='int'>6</span><span class='comma'>,</span> <span class='int'>9</span><span class='comma'>,</span> <span class='int'>11</span>
|
|
3383
|
-
<span class='int'>30</span>
|
|
3384
|
-
<span class='kw'>else</span>
|
|
3385
|
-
<span class='int'>31</span>
|
|
3386
|
-
<span class='kw'>end</span>
|
|
3387
|
-
<span class='kw'>end</span></pre>
|
|
3388
|
-
</td>
|
|
3389
|
-
</tr>
|
|
3390
|
-
</table>
|
|
3391
|
-
</div>
|
|
3392
|
-
|
|
3393
|
-
<div class="method_details ">
|
|
3394
|
-
<h3 class="signature " id="last_month_of_hebrew_year-instance_method">
|
|
3395
|
-
|
|
3396
|
-
- (<tt>Integer</tt>) <strong>last_month_of_hebrew_year</strong>
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
</h3><div class="docstring">
|
|
3403
|
-
<div class="discussion">
|
|
3404
|
-
|
|
3405
|
-
<p>The last month in this Hebrew year (12 or 13).</p>
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
</div>
|
|
3409
|
-
</div>
|
|
3410
|
-
<div class="tags">
|
|
3411
|
-
|
|
3412
|
-
<p class="tag_title">Returns:</p>
|
|
3413
|
-
<ul class="return">
|
|
3414
|
-
|
|
3415
|
-
<li>
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
</li>
|
|
3423
|
-
|
|
3424
|
-
</ul>
|
|
3425
|
-
|
|
3426
|
-
</div><table class="source_code">
|
|
3427
|
-
<tr>
|
|
3428
|
-
<td>
|
|
3429
|
-
<pre class="lines">
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
464
|
|
3433
|
-
465
|
|
3434
|
-
466</pre>
|
|
3435
|
-
</td>
|
|
3436
|
-
<td>
|
|
3437
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 464</span>
|
|
3438
|
-
|
|
3439
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span>
|
|
3440
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span><span class='lparen'>(</span><span class='ivar'>@hebrew_year</span><span class='rparen'>)</span>
|
|
3441
|
-
<span class='kw'>end</span></pre>
|
|
3442
|
-
</td>
|
|
3443
|
-
</tr>
|
|
3444
|
-
</table>
|
|
3445
|
-
</div>
|
|
3446
|
-
|
|
3447
|
-
<div class="method_details ">
|
|
3448
|
-
<h3 class="signature " id="next-instance_method">
|
|
3449
|
-
|
|
3450
|
-
- (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>next</strong>
|
|
3451
|
-
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
<span class="aliases">Also known as:
|
|
3455
|
-
<span class="names"><span id='succ-instance_method'>succ</span></span>
|
|
3456
|
-
</span>
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
</h3><div class="docstring">
|
|
3461
|
-
<div class="discussion">
|
|
3462
|
-
|
|
3463
|
-
<p>This does not modify the current date, but creates a new one.</p>
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
</div>
|
|
3467
|
-
</div>
|
|
3468
|
-
<div class="tags">
|
|
3469
|
-
|
|
3470
|
-
<p class="tag_title">Returns:</p>
|
|
3471
|
-
<ul class="return">
|
|
3472
|
-
|
|
3473
|
-
<li>
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
<span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
|
|
3480
|
-
</li>
|
|
3481
|
-
|
|
3482
|
-
</ul>
|
|
3483
|
-
|
|
3484
|
-
</div><table class="source_code">
|
|
3485
|
-
<tr>
|
|
3486
|
-
<td>
|
|
3487
|
-
<pre class="lines">
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
287
|
|
3491
|
-
288
|
|
3492
|
-
289</pre>
|
|
3493
|
-
</td>
|
|
3494
|
-
<td>
|
|
3495
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 287</span>
|
|
3496
|
-
|
|
3497
|
-
<span class='kw'>def</span> <span class='kw'>next</span>
|
|
3498
|
-
<span class='kw'>self</span> <span class='op'>+</span> <span class='int'>1</span>
|
|
3499
|
-
<span class='kw'>end</span></pre>
|
|
3500
|
-
</td>
|
|
3501
|
-
</tr>
|
|
3502
|
-
</table>
|
|
3503
|
-
</div>
|
|
3504
|
-
|
|
3505
|
-
<div class="method_details ">
|
|
3506
|
-
<h3 class="signature " id="set_date-instance_method">
|
|
3507
|
-
|
|
3508
|
-
- (<tt>void</tt>) <strong>set_date</strong>(year, month, date)
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
</h3><div class="docstring">
|
|
3515
|
-
<div class="discussion">
|
|
3516
|
-
<p class="note returns_void">This method returns an undefined value.</p>
|
|
3517
|
-
<p>Set the Gregorian date of this HebrewDate.</p>
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
</div>
|
|
3521
|
-
</div>
|
|
3522
|
-
<div class="tags">
|
|
3523
|
-
<p class="tag_title">Parameters:</p>
|
|
3524
|
-
<ul class="param">
|
|
3525
|
-
|
|
3526
|
-
<li>
|
|
3527
|
-
|
|
3528
|
-
<span class='name'>year</span>
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
—
|
|
3536
|
-
<div class='inline'>
|
|
3537
|
-
<p>the Gregorian year (e.g. 2004)</p>
|
|
3538
|
-
</div>
|
|
3539
|
-
|
|
3540
|
-
</li>
|
|
3541
|
-
|
|
3542
|
-
<li>
|
|
3543
|
-
|
|
3544
|
-
<span class='name'>month</span>
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
—
|
|
3552
|
-
<div class='inline'>
|
|
3553
|
-
<p>the Gregorian month (1-12)</p>
|
|
3554
|
-
</div>
|
|
3555
|
-
|
|
3556
|
-
</li>
|
|
3557
|
-
|
|
3558
|
-
<li>
|
|
3559
|
-
|
|
3560
|
-
<span class='name'>date</span>
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
—
|
|
3568
|
-
<div class='inline'>
|
|
3569
|
-
<p>the Gregorian day of month (1-31)</p>
|
|
3570
|
-
</div>
|
|
3571
|
-
|
|
3572
|
-
</li>
|
|
3573
|
-
|
|
3574
|
-
</ul>
|
|
3575
|
-
|
|
3576
|
-
|
|
3577
|
-
</div><table class="source_code">
|
|
3578
|
-
<tr>
|
|
3579
|
-
<td>
|
|
3580
|
-
<pre class="lines">
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
180
|
|
3584
|
-
181
|
|
3585
|
-
182
|
|
3586
|
-
183
|
|
3587
|
-
184
|
|
3588
|
-
185
|
|
3589
|
-
186
|
|
3590
|
-
187
|
|
3591
|
-
188
|
|
3592
|
-
189
|
|
3593
|
-
190
|
|
3594
|
-
191
|
|
3595
|
-
192
|
|
3596
|
-
193
|
|
3597
|
-
194
|
|
3598
|
-
195
|
|
3599
|
-
196
|
|
3600
|
-
197
|
|
3601
|
-
198</pre>
|
|
3602
|
-
</td>
|
|
3603
|
-
<td>
|
|
3604
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 180</span>
|
|
3605
|
-
|
|
3606
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_set_date'>set_date</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='rparen'>)</span>
|
|
3607
|
-
<span class='comment'># precond should be 1->12 anyways, but just in case...
|
|
3608
|
-
</span> <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal value for year: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_year'>year</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_year'>year</span> <span class='op'><</span> <span class='int'>0</span>
|
|
3609
|
-
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal value for month: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_month'>month</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_month'>month</span> <span class='op'>></span> <span class='int'>12</span> <span class='op'>||</span> <span class='id identifier rubyid_month'>month</span> <span class='op'><</span> <span class='int'>0</span>
|
|
3610
|
-
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal value for date: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_date'>date</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_date'>date</span> <span class='op'><</span> <span class='int'>0</span>
|
|
3611
|
-
|
|
3612
|
-
<span class='comment'># make sure date is a valid date for the given month.
|
|
3613
|
-
</span> <span class='comment'># If not, set to last day of month
|
|
3614
|
-
</span> <span class='id identifier rubyid_last_day'>last_day</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day_of_month'>last_day_of_month</span><span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span><span class='rparen'>)</span>
|
|
3615
|
-
<span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day'>last_day</span> <span class='kw'>if</span> <span class='id identifier rubyid_date'>date</span> <span class='op'>></span> <span class='id identifier rubyid_last_day'>last_day</span>
|
|
3616
|
-
|
|
3617
|
-
<span class='ivar'>@year</span> <span class='op'>=</span> <span class='id identifier rubyid_year'>year</span>
|
|
3618
|
-
<span class='ivar'>@month</span> <span class='op'>=</span> <span class='id identifier rubyid_month'>month</span>
|
|
3619
|
-
<span class='ivar'>@date</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span>
|
|
3620
|
-
|
|
3621
|
-
<span class='comment'># init the Hebrew date
|
|
3622
|
-
</span> <span class='ivar'>@abs_date</span> <span class='op'>=</span> <span class='id identifier rubyid__date_to_abs_date'>_date_to_abs_date</span><span class='lparen'>(</span><span class='ivar'>@year</span><span class='comma'>,</span> <span class='ivar'>@month</span><span class='comma'>,</span> <span class='ivar'>@date</span><span class='rparen'>)</span>
|
|
3623
|
-
<span class='id identifier rubyid__abs_date_to_hebrew_date!'>_abs_date_to_hebrew_date!</span>
|
|
3624
|
-
<span class='kw'>end</span></pre>
|
|
3625
|
-
</td>
|
|
3626
|
-
</tr>
|
|
3627
|
-
</table>
|
|
3628
|
-
</div>
|
|
3629
|
-
|
|
3630
|
-
<div class="method_details ">
|
|
3631
|
-
<h3 class="signature " id="set_hebrew_date-instance_method">
|
|
3632
|
-
|
|
3633
|
-
- (<tt>void</tt>) <strong>set_hebrew_date</strong>(year, month, date, auto_set = false)
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
</h3><div class="docstring">
|
|
3640
|
-
<div class="discussion">
|
|
3641
|
-
<p class="note returns_void">This method returns an undefined value.</p>
|
|
3642
|
-
<p>Set the Hebrew date.</p>
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
</div>
|
|
3646
|
-
</div>
|
|
3647
|
-
<div class="tags">
|
|
3648
|
-
<p class="tag_title">Parameters:</p>
|
|
3649
|
-
<ul class="param">
|
|
3650
|
-
|
|
3651
|
-
<li>
|
|
3652
|
-
|
|
3653
|
-
<span class='name'>year</span>
|
|
3654
|
-
|
|
3655
|
-
|
|
3656
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3657
|
-
|
|
3658
|
-
|
|
3659
|
-
|
|
3660
|
-
—
|
|
3661
|
-
<div class='inline'>
|
|
3662
|
-
<p>the Hebrew year (e.g. 2008)</p>
|
|
3663
|
-
</div>
|
|
3664
|
-
|
|
3665
|
-
</li>
|
|
3666
|
-
|
|
3667
|
-
<li>
|
|
3668
|
-
|
|
3669
|
-
<span class='name'>month</span>
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
—
|
|
3677
|
-
<div class='inline'>
|
|
3678
|
-
<p>the Hebrew month (1-13)</p>
|
|
3679
|
-
</div>
|
|
3680
|
-
|
|
3681
|
-
</li>
|
|
3682
|
-
|
|
3683
|
-
<li>
|
|
3684
|
-
|
|
3685
|
-
<span class='name'>date</span>
|
|
3686
|
-
|
|
3687
|
-
|
|
3688
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
—
|
|
3693
|
-
<div class='inline'>
|
|
3694
|
-
<p>the Hebrew day of month (1-30)</p>
|
|
3695
|
-
</div>
|
|
3696
|
-
|
|
3697
|
-
</li>
|
|
3698
|
-
|
|
3699
|
-
<li>
|
|
3700
|
-
|
|
3701
|
-
<span class='name'>auto_set</span>
|
|
3702
|
-
|
|
3703
|
-
|
|
3704
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
—
|
|
3711
|
-
<div class='inline'>
|
|
3712
|
-
<p>Used internally.</p>
|
|
3713
|
-
</div>
|
|
3714
|
-
|
|
3715
|
-
</li>
|
|
3716
|
-
|
|
3717
|
-
</ul>
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
</div><table class="source_code">
|
|
3721
|
-
<tr>
|
|
3722
|
-
<td>
|
|
3723
|
-
<pre class="lines">
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
206
|
|
3727
|
-
207
|
|
3728
|
-
208
|
|
3729
|
-
209
|
|
3730
|
-
210
|
|
3731
|
-
211
|
|
3732
|
-
212
|
|
3733
|
-
213
|
|
3734
|
-
214
|
|
3735
|
-
215
|
|
3736
|
-
216
|
|
3737
|
-
217
|
|
3738
|
-
218
|
|
3739
|
-
219
|
|
3740
|
-
220
|
|
3741
|
-
221
|
|
3742
|
-
222
|
|
3743
|
-
223
|
|
3744
|
-
224
|
|
3745
|
-
225
|
|
3746
|
-
226
|
|
3747
|
-
227
|
|
3748
|
-
228
|
|
3749
|
-
229
|
|
3750
|
-
230
|
|
3751
|
-
231
|
|
3752
|
-
232</pre>
|
|
3753
|
-
</td>
|
|
3754
|
-
<td>
|
|
3755
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 206</span>
|
|
3756
|
-
|
|
3757
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_set_hebrew_date'>set_hebrew_date</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='comma'>,</span> <span class='id identifier rubyid_auto_set'>auto_set</span><span class='op'>=</span><span class='kw'>false</span><span class='rparen'>)</span>
|
|
3758
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_auto_set'>auto_set</span>
|
|
3759
|
-
<span class='ivar'>@hebrew_year</span> <span class='op'>=</span> <span class='id identifier rubyid_year'>year</span>
|
|
3760
|
-
<span class='ivar'>@hebrew_month</span> <span class='op'>=</span> <span class='id identifier rubyid_month'>month</span>
|
|
3761
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span>
|
|
3762
|
-
<span class='kw'>end</span>
|
|
3763
|
-
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal value for Hebrew year: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_year'>year</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_year'>year</span> <span class='op'><</span> <span class='int'>0</span>
|
|
3764
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_month'>month</span> <span class='op'><</span> <span class='int'>0</span> <span class='op'>||</span> <span class='id identifier rubyid_month'>month</span> <span class='op'>></span> <span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span>
|
|
3765
|
-
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal value for Hebrew month: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_month'>month</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
|
3766
|
-
<span class='kw'>end</span>
|
|
3767
|
-
<span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Illegal value for Hebrew date: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_date'>date</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_date'>date</span> <span class='op'><</span> <span class='int'>0</span>
|
|
3768
|
-
|
|
3769
|
-
<span class='comment'># make sure date is valid for this month;
|
|
3770
|
-
</span> <span class='comment'># otherwise, set to last day of month
|
|
3771
|
-
</span> <span class='id identifier rubyid_last_day'>last_day</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day_of_hebrew_month'>last_day_of_hebrew_month</span><span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span><span class='rparen'>)</span>
|
|
3772
|
-
<span class='id identifier rubyid_date'>date</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day'>last_day</span> <span class='kw'>if</span> <span class='id identifier rubyid_date'>date</span> <span class='op'>></span> <span class='id identifier rubyid_last_day'>last_day</span>
|
|
3773
|
-
|
|
3774
|
-
<span class='ivar'>@hebrew_year</span> <span class='op'>=</span> <span class='id identifier rubyid_year'>year</span>
|
|
3775
|
-
<span class='ivar'>@hebrew_month</span> <span class='op'>=</span> <span class='id identifier rubyid_month'>month</span>
|
|
3776
|
-
<span class='ivar'>@hebrew_date</span> <span class='op'>=</span> <span class='id identifier rubyid_date'>date</span>
|
|
3777
|
-
|
|
3778
|
-
<span class='comment'># reset gregorian date
|
|
3779
|
-
</span> <span class='ivar'>@abs_date</span> <span class='op'>=</span>
|
|
3780
|
-
<span class='id identifier rubyid__hebrew_date_to_abs_date'>_hebrew_date_to_abs_date</span><span class='lparen'>(</span><span class='ivar'>@hebrew_year</span><span class='comma'>,</span> <span class='ivar'>@hebrew_month</span><span class='comma'>,</span> <span class='ivar'>@hebrew_date</span><span class='rparen'>)</span>
|
|
3781
|
-
<span class='id identifier rubyid__abs_date_to_date!'>_abs_date_to_date!</span>
|
|
3782
|
-
|
|
3783
|
-
<span class='kw'>end</span></pre>
|
|
3784
|
-
</td>
|
|
3785
|
-
</tr>
|
|
3786
|
-
</table>
|
|
3787
|
-
</div>
|
|
3788
|
-
|
|
3789
|
-
<div class="method_details ">
|
|
3790
|
-
<h3 class="signature " id="shabbos?-instance_method">
|
|
3791
|
-
|
|
3792
|
-
- (<tt>Boolean</tt>) <strong>shabbos?</strong>
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
<span class="aliases">Also known as:
|
|
3797
|
-
<span class="names"><span id='shabbat?-instance_method'>shabbat?</span></span>
|
|
3798
|
-
</span>
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
</h3><div class="docstring">
|
|
3803
|
-
<div class="discussion">
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
</div>
|
|
3807
|
-
</div>
|
|
3808
|
-
<div class="tags">
|
|
3809
|
-
|
|
3810
|
-
<p class="tag_title">Returns:</p>
|
|
3811
|
-
<ul class="return">
|
|
3812
|
-
|
|
3813
|
-
<li>
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
</li>
|
|
3821
|
-
|
|
3822
|
-
</ul>
|
|
3823
|
-
|
|
3824
|
-
</div><table class="source_code">
|
|
3825
|
-
<tr>
|
|
3826
|
-
<td>
|
|
3827
|
-
<pre class="lines">
|
|
3828
|
-
|
|
3829
|
-
|
|
3830
|
-
356
|
|
3831
|
-
357
|
|
3832
|
-
358</pre>
|
|
3833
|
-
</td>
|
|
3834
|
-
<td>
|
|
3835
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 356</span>
|
|
3836
|
-
|
|
3837
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_shabbos?'>shabbos?</span>
|
|
3838
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_saturday?'>saturday?</span>
|
|
3839
|
-
<span class='kw'>end</span></pre>
|
|
3840
|
-
</td>
|
|
3841
|
-
</tr>
|
|
3842
|
-
</table>
|
|
3843
|
-
</div>
|
|
3844
|
-
|
|
3845
|
-
<div class="method_details ">
|
|
3846
|
-
<h3 class="signature " id="step-instance_method">
|
|
3847
|
-
|
|
3848
|
-
- (<tt>Object</tt>) <strong>step</strong>(limit, step = 1, &block)
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3853
|
-
|
|
3854
|
-
</h3><div class="docstring">
|
|
3855
|
-
<div class="discussion">
|
|
3856
|
-
|
|
3857
|
-
<p>Iterates evaluation of the given block, which takes a HebrewDate object.
|
|
3858
|
-
The limit should be a Date or HebrewDate object.</p>
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
</div>
|
|
3862
|
-
</div>
|
|
3863
|
-
<div class="tags">
|
|
3864
|
-
|
|
3865
|
-
|
|
3866
|
-
</div><table class="source_code">
|
|
3867
|
-
<tr>
|
|
3868
|
-
<td>
|
|
3869
|
-
<pre class="lines">
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
141
|
|
3873
|
-
142
|
|
3874
|
-
143
|
|
3875
|
-
144</pre>
|
|
3876
|
-
</td>
|
|
3877
|
-
<td>
|
|
3878
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 141</span>
|
|
3879
|
-
|
|
3880
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span><span class='id identifier rubyid_limit'>limit</span><span class='comma'>,</span> <span class='id identifier rubyid_step'>step</span><span class='op'>=</span><span class='int'>1</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
3881
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_to_enum'>to_enum</span><span class='lparen'>(</span><span class='symbol'>:step</span><span class='comma'>,</span> <span class='id identifier rubyid_limit'>limit</span><span class='comma'>,</span> <span class='id identifier rubyid_step'>step</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
3882
|
-
<span class='lparen'>(</span><span class='kw'>self</span><span class='op'>..</span><span class='id identifier rubyid_limit'>limit</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span><span class='id identifier rubyid_step'>step</span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_date'>date</span><span class='op'>|</span> <span class='kw'>yield</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
|
|
3883
|
-
<span class='kw'>end</span></pre>
|
|
3884
|
-
</td>
|
|
3885
|
-
</tr>
|
|
3886
|
-
</table>
|
|
3887
|
-
</div>
|
|
3888
|
-
|
|
3889
|
-
<div class="method_details ">
|
|
3890
|
-
<h3 class="signature " id="strftime-instance_method">
|
|
3891
|
-
|
|
3892
|
-
- (<tt>String</tt>) <strong>strftime</strong>(format)
|
|
3893
|
-
|
|
3894
|
-
|
|
3895
|
-
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
</h3><div class="docstring">
|
|
3899
|
-
<div class="discussion">
|
|
3900
|
-
|
|
3901
|
-
<p>Extend the Date strftime method by replacing Hebrew fields. You can denote
|
|
3902
|
-
Hebrew fields by using the * flag. There is one extra flag, %.b, which adds
|
|
3903
|
-
a period after the 3-letter month name <strong>except</strong> for May.
|
|
3904
|
-
Also note that ::replace_saturday will replace the %A, %^A, %a and %^a
|
|
3905
|
-
flags with Shabbat/Shabbos. Supported flags are:</p>
|
|
3906
|
-
|
|
3907
|
-
<pre class="code ruby"><code class="ruby">* *Y - Hebrew year
|
|
3908
|
-
* *m - Hebrew month, zero-padded
|
|
3909
|
-
* *_m - Hebrew month, blank-padded
|
|
3910
|
-
* *-m - Hebrew month, no-padded
|
|
3911
|
-
* *B - Hebrew month, full name
|
|
3912
|
-
* *^B - Hebrew month, full name uppercase
|
|
3913
|
-
* *b - Hebrew month, 3 letters
|
|
3914
|
-
* *^b - Hebrew month, 3 letters uppercase
|
|
3915
|
-
* *h - same as %*b
|
|
3916
|
-
* *d - Hebrew day of month, zero-padded
|
|
3917
|
-
* *-d - Hebrew day of month, no-padded
|
|
3918
|
-
* *e - Hebrew day of month, blank-padded
|
|
3919
|
-
* %.b - Gregorian month, 3 letter name, followed by a period, except for
|
|
3920
|
-
May</code></pre>
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
</div>
|
|
3924
|
-
</div>
|
|
3925
|
-
<div class="tags">
|
|
3926
|
-
<p class="tag_title">Parameters:</p>
|
|
3927
|
-
<ul class="param">
|
|
3928
|
-
|
|
3929
|
-
<li>
|
|
3930
|
-
|
|
3931
|
-
<span class='name'>format</span>
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
</li>
|
|
3939
|
-
|
|
3940
|
-
</ul>
|
|
3941
|
-
|
|
3942
|
-
<p class="tag_title">Returns:</p>
|
|
3943
|
-
<ul class="return">
|
|
3944
|
-
|
|
3945
|
-
<li>
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
<span class='type'>(<tt>String</tt>)</span>
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
</li>
|
|
3953
|
-
|
|
3954
|
-
</ul>
|
|
3955
|
-
|
|
3956
|
-
</div><table class="source_code">
|
|
3957
|
-
<tr>
|
|
3958
|
-
<td>
|
|
3959
|
-
<pre class="lines">
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
384
|
|
3963
|
-
385
|
|
3964
|
-
386
|
|
3965
|
-
387
|
|
3966
|
-
388
|
|
3967
|
-
389
|
|
3968
|
-
390
|
|
3969
|
-
391
|
|
3970
|
-
392
|
|
3971
|
-
393
|
|
3972
|
-
394
|
|
3973
|
-
395
|
|
3974
|
-
396
|
|
3975
|
-
397
|
|
3976
|
-
398
|
|
3977
|
-
399
|
|
3978
|
-
400
|
|
3979
|
-
401
|
|
3980
|
-
402
|
|
3981
|
-
403
|
|
3982
|
-
404
|
|
3983
|
-
405
|
|
3984
|
-
406</pre>
|
|
3985
|
-
</td>
|
|
3986
|
-
<td>
|
|
3987
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 384</span>
|
|
3988
|
-
|
|
3989
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_strftime'>strftime</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
|
|
3990
|
-
<span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*Y</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_year</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='period'>
|
|
3991
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*m</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_month</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>2</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
|
|
3992
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*_m</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_month</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>2</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
|
|
3993
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*-m</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_month</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='period'>
|
|
3994
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*B</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='rparen'>)</span><span class='period'>
|
|
3995
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*^B</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='rparen'>)</span><span class='period'>
|
|
3996
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*b</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>
|
|
3997
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*^b</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='rparen'>)</span><span class='period'>
|
|
3998
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*h</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='int'>3</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>
|
|
3999
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*d</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_date</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>2</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
|
|
4000
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*-d</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_date</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='period'>
|
|
4001
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>*e</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@hebrew_date</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='int'>2</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'> </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
|
|
4002
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%.b</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span> <span class='op'>==</span> <span class='int'>5</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%b</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%b.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
4003
|
-
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_replace_saturday'>replace_saturday</span> <span class='op'>&&</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_day'>day</span> <span class='op'>==</span> <span class='int'>7</span>
|
|
4004
|
-
<span class='id identifier rubyid_shab_name'>shab_name</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_ashkenaz'>ashkenaz</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Shabbos</span><span class='tstring_end'>'</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Shabbat</span><span class='tstring_end'>'</span></span>
|
|
4005
|
-
<span class='id identifier rubyid_format'>format</span> <span class='op'>=</span> <span class='id identifier rubyid_format'>format</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%A</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_shab_name'>shab_name</span><span class='rparen'>)</span><span class='period'>
|
|
4006
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%^A</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_shab_name'>shab_name</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='rparen'>)</span><span class='period'>
|
|
4007
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%a</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_shab_name'>shab_name</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='int'>2</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>
|
|
4008
|
-
</span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>%^a</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_shab_name'>shab_name</span><span class='lbracket'>[</span><span class='int'>0</span><span class='op'>..</span><span class='int'>2</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_upcase'>upcase</span><span class='rparen'>)</span>
|
|
4009
|
-
<span class='kw'>end</span>
|
|
4010
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
|
|
4011
|
-
<span class='kw'>end</span></pre>
|
|
4012
|
-
</td>
|
|
4013
|
-
</tr>
|
|
4014
|
-
</table>
|
|
4015
|
-
</div>
|
|
4016
|
-
|
|
4017
|
-
<div class="method_details ">
|
|
4018
|
-
<h3 class="signature " id="to_date-instance_method">
|
|
4019
|
-
|
|
4020
|
-
- (<tt>Date</tt>) <strong>to_date</strong>
|
|
4021
|
-
|
|
4022
|
-
|
|
4023
|
-
|
|
4024
|
-
|
|
4025
|
-
|
|
4026
|
-
</h3><div class="docstring">
|
|
4027
|
-
<div class="discussion">
|
|
4028
|
-
|
|
4029
|
-
<p>Return a Ruby Date corresponding to the Gregorian date.</p>
|
|
4030
|
-
|
|
4031
|
-
|
|
4032
|
-
</div>
|
|
4033
|
-
</div>
|
|
4034
|
-
<div class="tags">
|
|
4035
|
-
|
|
4036
|
-
<p class="tag_title">Returns:</p>
|
|
4037
|
-
<ul class="return">
|
|
4038
|
-
|
|
4039
|
-
<li>
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
<span class='type'>(<tt>Date</tt>)</span>
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
</li>
|
|
4047
|
-
|
|
4048
|
-
</ul>
|
|
4049
|
-
|
|
4050
|
-
</div><table class="source_code">
|
|
4051
|
-
<tr>
|
|
4052
|
-
<td>
|
|
4053
|
-
<pre class="lines">
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
236
|
|
4057
|
-
237
|
|
4058
|
-
238</pre>
|
|
4059
|
-
</td>
|
|
4060
|
-
<td>
|
|
4061
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 236</span>
|
|
4062
|
-
|
|
4063
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_to_date'>to_date</span>
|
|
4064
|
-
<span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='ivar'>@year</span><span class='comma'>,</span> <span class='ivar'>@month</span><span class='comma'>,</span> <span class='ivar'>@date</span><span class='rparen'>)</span>
|
|
4065
|
-
<span class='kw'>end</span></pre>
|
|
4066
|
-
</td>
|
|
4067
|
-
</tr>
|
|
4068
|
-
</table>
|
|
4069
|
-
</div>
|
|
4070
|
-
|
|
4071
|
-
<div class="method_details ">
|
|
4072
|
-
<h3 class="signature " id="upto-instance_method">
|
|
4073
|
-
|
|
4074
|
-
- (<tt>Enumerator|self</tt>) <strong>upto</strong>(max, &block)
|
|
4075
|
-
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
</h3><div class="docstring">
|
|
4081
|
-
<div class="discussion">
|
|
4082
|
-
|
|
4083
|
-
<p>This method is equivalent to step(max, 1){ |date| …}.</p>
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
</div>
|
|
4087
|
-
</div>
|
|
4088
|
-
<div class="tags">
|
|
4089
|
-
<p class="tag_title">Parameters:</p>
|
|
4090
|
-
<ul class="param">
|
|
4091
|
-
|
|
4092
|
-
<li>
|
|
4093
|
-
|
|
4094
|
-
<span class='name'>max</span>
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
</li>
|
|
4102
|
-
|
|
4103
|
-
</ul>
|
|
4104
|
-
|
|
4105
|
-
<p class="tag_title">Returns:</p>
|
|
4106
|
-
<ul class="return">
|
|
4107
|
-
|
|
4108
|
-
<li>
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
<span class='type'>(<tt>Enumerator|self</tt>)</span>
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
</li>
|
|
4116
|
-
|
|
4117
|
-
</ul>
|
|
4118
|
-
|
|
4119
|
-
</div><table class="source_code">
|
|
4120
|
-
<tr>
|
|
4121
|
-
<td>
|
|
4122
|
-
<pre class="lines">
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
157
|
|
4126
|
-
158
|
|
4127
|
-
159
|
|
4128
|
-
160</pre>
|
|
4129
|
-
</td>
|
|
4130
|
-
<td>
|
|
4131
|
-
<pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 157</span>
|
|
4132
|
-
|
|
4133
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_upto'>upto</span><span class='lparen'>(</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
4134
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_to_enum'>to_enum</span><span class='lparen'>(</span><span class='symbol'>:upto</span><span class='comma'>,</span> <span class='id identifier rubyid_max'>max</span><span class='rparen'>)</span> <span class='kw'>unless</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
|
4135
|
-
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_step'>step</span><span class='lparen'>(</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span> <span class='int'>1</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
4136
|
-
<span class='kw'>end</span></pre>
|
|
4137
|
-
</td>
|
|
4138
|
-
</tr>
|
|
4139
|
-
</table>
|
|
4140
|
-
</div>
|
|
4141
|
-
|
|
4142
|
-
</div>
|
|
4143
|
-
|
|
4144
|
-
</div>
|
|
4145
|
-
|
|
4146
|
-
<div id="footer">
|
|
4147
|
-
Generated on Fri Sep 19 12:15:10 2014 by
|
|
4148
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
4149
|
-
0.8.7.3 (ruby-2.0.0).
|
|
4150
|
-
</div>
|
|
4151
|
-
|
|
4152
|
-
</body>
|
|
4153
|
-
</html>
|