hebrew_date 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0cfbf74b6b71127662f659559b716f0e042e8002
4
- data.tar.gz: 4475b8b7f053134cb63d532aaa61e079a29f773b
3
+ metadata.gz: 24e654aa92dc0e36e925d44324f6b240690c899c
4
+ data.tar.gz: cb50cff9217cafce06dfce01080ea7e90e2b4162
5
5
  SHA512:
6
- metadata.gz: 31515f182a5876d84ef9ebca46df71dddc5129fb4a0991088ce03a6122dd8014ccade153334b24ed2250dd6d5974457c9512763d24551dea36019b6fd5e6060e
7
- data.tar.gz: 0bd5f52e8ca3d31e589533626c6b9fa9ca40b674d6eec07c9bab354a254b5f56ba98767b3e665415036978ac01d03650e7fe816ab8c6d34a23206590957ac8ba
6
+ metadata.gz: e713b4b77fb877bb1ab40ed8a0ba7c1ac2c6df341763ea20e356c711cc8346c230be75ba46af4bf4c41cfcd3d90644b491a24df73a8e541d689b46a1a66940c4
7
+ data.tar.gz: 3d2a8a61c26f7afe575a9ef14fe3a124ce4e3e8bee6dd27d1585dcc9a6dd14b054b21939e573678e5b6b6ccd47982057b503541d19029efefe983c3aa3acbe34
data/README.md CHANGED
@@ -25,6 +25,7 @@ HebrewDates respond to all the methods dates do:
25
25
 
26
26
  HebrewDate.new.saturday?
27
27
  HebrewDate.new.beginning_of_week # Rails
28
+ HebrewDate.new + 3 # go 3 days forward
28
29
 
29
30
  Printing
30
31
  ========
@@ -73,4 +74,7 @@ accents by default. You can change this to Ashkenazi pronunciation by calling
73
74
 
74
75
  HebrewDate.ashkenazi = true
75
76
 
77
+ You can also retrieve a date from the holiday name:
78
+
79
+ HebrewDate.from_holiday(:PURIM, 5774)
76
80
 
data/doc/HebrewDate.html CHANGED
@@ -90,17 +90,21 @@
90
90
 
91
91
 
92
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
+
93
97
 
94
98
 
95
- <dt class="r2">Includes:</dt>
96
- <dd class="r2"><span class='object_link'><a href="HebrewDateSupport/Holidays.html" title="HebrewDateSupport::Holidays (module)">HebrewDateSupport::Holidays</a></span>, <span class='object_link'><a href="HebrewDateSupport/Parshiot.html" title="HebrewDateSupport::Parshiot (module)">HebrewDateSupport::Parshiot</a></span></dd>
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>
97
101
 
98
102
 
99
103
 
100
104
 
101
105
 
102
- <dt class="r1 last">Defined in:</dt>
103
- <dd class="r1 last">lib/hebrew_date.rb</dd>
106
+ <dt class="r2 last">Defined in:</dt>
107
+ <dd class="r2 last">lib/hebrew_date.rb</dd>
104
108
 
105
109
  </dl>
106
110
  <div class="clear"></div>
@@ -124,6 +128,12 @@ it should respond accordingly.</p>
124
128
 
125
129
 
126
130
 
131
+ <h2>Constant Summary</h2>
132
+
133
+ <h3 class="inherited">Constants included
134
+ from <span class='object_link'><a href="HebrewDateSupport/HolidayMethods/ClassMethods.html" title="HebrewDateSupport::HolidayMethods::ClassMethods (module)">HebrewDateSupport::HolidayMethods::ClassMethods</a></span></h3>
135
+ <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>
136
+
127
137
 
128
138
  <h2>Class Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
129
139
  <ul class="summary">
@@ -377,6 +387,78 @@ it should respond accordingly.</p>
377
387
  <li class="public ">
378
388
  <span class="summary_signature">
379
389
 
390
+ <a href="#hebrew_leap_year%3F-class_method" title="hebrew_leap_year? (class method)">+ (Boolean) <strong>hebrew_leap_year?</strong>(year) </a>
391
+
392
+
393
+
394
+ </span>
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+ <span class="summary_desc"><div class='inline'>
405
+ <p>Is this a Hebrew leap year?.</p>
406
+ </div></span>
407
+
408
+ </li>
409
+
410
+
411
+ <li class="public ">
412
+ <span class="summary_signature">
413
+
414
+ <a href="#hebrew_month_to_s-class_method" title="hebrew_month_to_s (class method)">+ (Object) <strong>hebrew_month_to_s</strong>(month) </a>
415
+
416
+
417
+
418
+ </span>
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <span class="summary_desc"><div class='inline'>
429
+ <p>Get the name of the given Hebrew month.</p>
430
+ </div></span>
431
+
432
+ </li>
433
+
434
+
435
+ <li class="public ">
436
+ <span class="summary_signature">
437
+
438
+ <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>
439
+
440
+
441
+
442
+ </span>
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+ <span class="summary_desc"><div class='inline'>
453
+ <p>The last month in the Hebrew year (12 or 13).</p>
454
+ </div></span>
455
+
456
+ </li>
457
+
458
+
459
+ <li class="public ">
460
+ <span class="summary_signature">
461
+
380
462
  <a href="#new_from_hebrew-class_method" title="new_from_hebrew (class method)">+ (Object) <strong>new_from_hebrew</strong>(year, month, date) </a>
381
463
 
382
464
 
@@ -410,7 +492,55 @@ it should respond accordingly.</p>
410
492
  <li class="public ">
411
493
  <span class="summary_signature">
412
494
 
413
- <a href="#back-instance_method" title="#back (instance method)">- (void) <strong>back</strong> </a>
495
+ <a href="#%2B-instance_method" title="#+ (instance method)">- (HebrewDate) <strong>+</strong>(other_date) </a>
496
+
497
+
498
+
499
+ </span>
500
+
501
+
502
+
503
+
504
+
505
+
506
+
507
+
508
+
509
+ <span class="summary_desc"><div class='inline'>
510
+ <p>Add the dates specified (in days).</p>
511
+ </div></span>
512
+
513
+ </li>
514
+
515
+
516
+ <li class="public ">
517
+ <span class="summary_signature">
518
+
519
+ <a href="#--instance_method" title="#- (instance method)">- (HebrewDate) <strong>-</strong>(other_date) </a>
520
+
521
+
522
+
523
+ </span>
524
+
525
+
526
+
527
+
528
+
529
+
530
+
531
+
532
+
533
+ <span class="summary_desc"><div class='inline'>
534
+ <p>Subtract the dates specified (in days).</p>
535
+ </div></span>
536
+
537
+ </li>
538
+
539
+
540
+ <li class="public ">
541
+ <span class="summary_signature">
542
+
543
+ <a href="#back-instance_method" title="#back (instance method)">- (HebrewDate) <strong>back</strong> </a>
414
544
 
415
545
 
416
546
 
@@ -482,7 +612,7 @@ it should respond accordingly.</p>
482
612
  <li class="public ">
483
613
  <span class="summary_signature">
484
614
 
485
- <a href="#forward-instance_method" title="#forward (instance method)">- (void) <strong>forward</strong> </a>
615
+ <a href="#forward-instance_method" title="#forward (instance method)">- (HebrewDate) <strong>forward</strong> </a>
486
616
 
487
617
 
488
618
 
@@ -506,7 +636,7 @@ it should respond accordingly.</p>
506
636
  <li class="public ">
507
637
  <span class="summary_signature">
508
638
 
509
- <a href="#hebrew_leap_year%3F-instance_method" title="#hebrew_leap_year? (instance method)">- (Boolean) <strong>hebrew_leap_year?</strong>(year = nil) </a>
639
+ <a href="#hebrew_leap_year%3F-instance_method" title="#hebrew_leap_year? (instance method)">- (Boolean) <strong>hebrew_leap_year?</strong> </a>
510
640
 
511
641
 
512
642
 
@@ -757,8 +887,19 @@ it should respond accordingly.</p>
757
887
 
758
888
 
759
889
 
760
- <h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/Holidays.html" title="HebrewDateSupport::Holidays (module)">HebrewDateSupport::Holidays</a></span></h3>
761
- <p class="inherited"><span class='object_link'><a href="HebrewDateSupport/Holidays.html#candle_lighting_day%3F-instance_method" title="HebrewDateSupport::Holidays#candle_lighting_day? (method)">#candle_lighting_day?</a></span>, <span class='object_link'><a href="HebrewDateSupport/Holidays.html#first_day_yom_tov%3F-instance_method" title="HebrewDateSupport::Holidays#first_day_yom_tov? (method)">#first_day_yom_tov?</a></span>, <span class='object_link'><a href="HebrewDateSupport/Holidays.html#havdala_day%3F-instance_method" title="HebrewDateSupport::Holidays#havdala_day? (method)">#havdala_day?</a></span>, <span class='object_link'><a href="HebrewDateSupport/Holidays.html#holiday-instance_method" title="HebrewDateSupport::Holidays#holiday (method)">#holiday</a></span>, <span class='object_link'><a href="HebrewDateSupport/Holidays.html#omer-instance_method" title="HebrewDateSupport::Holidays#omer (method)">#omer</a></span>, <span class='object_link'><a href="HebrewDateSupport/Holidays.html#omer_to_s-instance_method" title="HebrewDateSupport::Holidays#omer_to_s (method)">#omer_to_s</a></span>, <span class='object_link'><a href="HebrewDateSupport/Holidays.html#rosh_chodesh%3F-instance_method" title="HebrewDateSupport::Holidays#rosh_chodesh? (method)">#rosh_chodesh?</a></span></p>
890
+ <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>
891
+ <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>
892
+
893
+
894
+
895
+
896
+
897
+
898
+
899
+
900
+
901
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/HolidayMethods.html" title="HebrewDateSupport::HolidayMethods (module)">HebrewDateSupport::HolidayMethods</a></span></h3>
902
+ <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></p>
762
903
 
763
904
 
764
905
 
@@ -768,8 +909,8 @@ it should respond accordingly.</p>
768
909
 
769
910
 
770
911
 
771
- <h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/Parshiot.html" title="HebrewDateSupport::Parshiot (module)">HebrewDateSupport::Parshiot</a></span></h3>
772
- <p class="inherited"><span class='object_link'><a href="HebrewDateSupport/Parshiot.html#parsha-instance_method" title="HebrewDateSupport::Parshiot#parsha (method)">#parsha</a></span></p>
912
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html" title="HebrewDateSupport::ParshaMethods (module)">HebrewDateSupport::ParshaMethods</a></span></h3>
913
+ <p class="inherited"><span class='object_link'><a href="HebrewDateSupport/ParshaMethods.html#parsha-instance_method" title="HebrewDateSupport::ParshaMethods#parsha (method)">#parsha</a></span></p>
773
914
 
774
915
  <div id="constructor_details" class="method_details_list">
775
916
  <h2>Constructor Details</h2>
@@ -800,7 +941,6 @@ it should respond accordingly.</p>
800
941
  <pre class="lines">
801
942
 
802
943
 
803
- 59
804
944
  60
805
945
  61
806
946
  62
@@ -818,10 +958,11 @@ it should respond accordingly.</p>
818
958
  74
819
959
  75
820
960
  76
821
- 77</pre>
961
+ 77
962
+ 78</pre>
822
963
  </td>
823
964
  <td>
824
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 59</span>
965
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 60</span>
825
966
 
826
967
  <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>
827
968
  <span class='ivar'>@abs_date</span> <span class='op'>=</span> <span class='int'>0</span>
@@ -898,12 +1039,12 @@ it should respond accordingly.</p>
898
1039
  <pre class="lines">
899
1040
 
900
1041
 
901
- 28
902
1042
  29
903
- 30</pre>
1043
+ 30
1044
+ 31</pre>
904
1045
  </td>
905
1046
  <td>
906
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 28</span>
1047
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 29</span>
907
1048
 
908
1049
  <span class='kw'>def</span> <span class='id identifier rubyid_ashkenaz'>ashkenaz</span>
909
1050
  <span class='ivar'>@ashkenaz</span>
@@ -959,12 +1100,12 @@ it should respond accordingly.</p>
959
1100
  <pre class="lines">
960
1101
 
961
1102
 
962
- 31
963
1103
  32
964
- 33</pre>
1104
+ 33
1105
+ 34</pre>
965
1106
  </td>
966
1107
  <td>
967
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 31</span>
1108
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 32</span>
968
1109
 
969
1110
  <span class='kw'>def</span> <span class='id identifier rubyid_israeli'>israeli</span>
970
1111
  <span class='ivar'>@israeli</span>
@@ -1025,12 +1166,12 @@ it should respond accordingly.</p>
1025
1166
  <pre class="lines">
1026
1167
 
1027
1168
 
1028
- 45
1029
1169
  46
1030
- 47</pre>
1170
+ 47
1171
+ 48</pre>
1031
1172
  </td>
1032
1173
  <td>
1033
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 45</span>
1174
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 46</span>
1034
1175
 
1035
1176
  <span class='kw'>def</span> <span class='id identifier rubyid_date'>date</span>
1036
1177
  <span class='ivar'>@date</span>
@@ -1086,12 +1227,12 @@ it should respond accordingly.</p>
1086
1227
  <pre class="lines">
1087
1228
 
1088
1229
 
1089
- 54
1090
1230
  55
1091
- 56</pre>
1231
+ 56
1232
+ 57</pre>
1092
1233
  </td>
1093
1234
  <td>
1094
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 54</span>
1235
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 55</span>
1095
1236
 
1096
1237
  <span class='kw'>def</span> <span class='id identifier rubyid_hebrew_date'>hebrew_date</span>
1097
1238
  <span class='ivar'>@hebrew_date</span>
@@ -1147,12 +1288,12 @@ it should respond accordingly.</p>
1147
1288
  <pre class="lines">
1148
1289
 
1149
1290
 
1150
- 51
1151
1291
  52
1152
- 53</pre>
1292
+ 53
1293
+ 54</pre>
1153
1294
  </td>
1154
1295
  <td>
1155
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 51</span>
1296
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 52</span>
1156
1297
 
1157
1298
  <span class='kw'>def</span> <span class='id identifier rubyid_hebrew_month'>hebrew_month</span>
1158
1299
  <span class='ivar'>@hebrew_month</span>
@@ -1208,12 +1349,12 @@ it should respond accordingly.</p>
1208
1349
  <pre class="lines">
1209
1350
 
1210
1351
 
1211
- 48
1212
1352
  49
1213
- 50</pre>
1353
+ 50
1354
+ 51</pre>
1214
1355
  </td>
1215
1356
  <td>
1216
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 48</span>
1357
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 49</span>
1217
1358
 
1218
1359
  <span class='kw'>def</span> <span class='id identifier rubyid_hebrew_year'>hebrew_year</span>
1219
1360
  <span class='ivar'>@hebrew_year</span>
@@ -1269,12 +1410,12 @@ it should respond accordingly.</p>
1269
1410
  <pre class="lines">
1270
1411
 
1271
1412
 
1272
- 42
1273
1413
  43
1274
- 44</pre>
1414
+ 44
1415
+ 45</pre>
1275
1416
  </td>
1276
1417
  <td>
1277
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 42</span>
1418
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 43</span>
1278
1419
 
1279
1420
  <span class='kw'>def</span> <span class='id identifier rubyid_month'>month</span>
1280
1421
  <span class='ivar'>@month</span>
@@ -1330,12 +1471,12 @@ it should respond accordingly.</p>
1330
1471
  <pre class="lines">
1331
1472
 
1332
1473
 
1333
- 39
1334
1474
  40
1335
- 41</pre>
1475
+ 41
1476
+ 42</pre>
1336
1477
  </td>
1337
1478
  <td>
1338
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 39</span>
1479
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 40</span>
1339
1480
 
1340
1481
  <span class='kw'>def</span> <span class='id identifier rubyid_year'>year</span>
1341
1482
  <span class='ivar'>@year</span>
@@ -1353,9 +1494,9 @@ it should respond accordingly.</p>
1353
1494
 
1354
1495
 
1355
1496
  <div class="method_details first">
1356
- <h3 class="signature first" id="new_from_hebrew-class_method">
1497
+ <h3 class="signature first" id="hebrew_leap_year?-class_method">
1357
1498
 
1358
- + (<tt>Object</tt>) <strong>new_from_hebrew</strong>(year, month, date)
1499
+ + (<tt>Boolean</tt>) <strong>hebrew_leap_year?</strong>(year)
1359
1500
 
1360
1501
 
1361
1502
 
@@ -1364,7 +1505,7 @@ it should respond accordingly.</p>
1364
1505
  </h3><div class="docstring">
1365
1506
  <div class="discussion">
1366
1507
 
1367
- <p>Create a HebrewDate with initialized Hebrew date values.</p>
1508
+ <p>Is this a Hebrew leap year?</p>
1368
1509
 
1369
1510
 
1370
1511
  </div>
@@ -1384,81 +1525,52 @@ it should respond accordingly.</p>
1384
1525
 
1385
1526
  &mdash;
1386
1527
  <div class='inline'>
1387
- <p>the Hebrew year (e.g. 5774)</p>
1528
+ <p>the Hebrew year.</p>
1388
1529
  </div>
1389
1530
 
1390
1531
  </li>
1391
1532
 
1392
- <li>
1393
-
1394
- <span class='name'>month</span>
1395
-
1396
-
1397
- <span class='type'>(<tt>Integer</tt>)</span>
1398
-
1399
-
1400
-
1401
- &mdash;
1402
- <div class='inline'>
1403
- <p>the Hebrew month (1-13)</p>
1404
- </div>
1405
-
1406
- </li>
1533
+ </ul>
1534
+
1535
+ <p class="tag_title">Returns:</p>
1536
+ <ul class="return">
1407
1537
 
1408
1538
  <li>
1409
1539
 
1410
- <span class='name'>date</span>
1411
-
1412
-
1413
- <span class='type'>(<tt>Integer</tt>)</span>
1414
1540
 
1541
+ <span class='type'>(<tt>Boolean</tt>)</span>
1415
1542
 
1416
1543
 
1417
- &mdash;
1418
- <div class='inline'>
1419
- <p>the day of the Hebrew month (1-30)</p>
1420
- </div>
1421
1544
 
1422
1545
  </li>
1423
1546
 
1424
1547
  </ul>
1425
1548
 
1426
-
1427
1549
  </div><table class="source_code">
1428
1550
  <tr>
1429
1551
  <td>
1430
1552
  <pre class="lines">
1431
1553
 
1432
1554
 
1433
- 104
1434
- 105
1435
- 106
1436
- 107
1437
- 108</pre>
1555
+ 347
1556
+ 348
1557
+ 349</pre>
1438
1558
  </td>
1439
1559
  <td>
1440
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 104</span>
1560
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 347</span>
1441
1561
 
1442
- <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>
1443
- <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>
1444
- <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='rparen'>)</span>
1445
- <span class='id identifier rubyid_d'>d</span>
1562
+ <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>
1563
+ <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'>&lt;</span> <span class='int'>7</span>
1446
1564
  <span class='kw'>end</span></pre>
1447
1565
  </td>
1448
1566
  </tr>
1449
1567
  </table>
1450
1568
  </div>
1451
1569
 
1452
- </div>
1453
-
1454
- <div id="instance_method_details" class="method_details_list">
1455
- <h2>Instance Method Details</h2>
1456
-
1457
-
1458
- <div class="method_details first">
1459
- <h3 class="signature first" id="back-instance_method">
1570
+ <div class="method_details ">
1571
+ <h3 class="signature " id="hebrew_month_to_s-class_method">
1460
1572
 
1461
- - (<tt>void</tt>) <strong>back</strong>
1573
+ + (<tt>Object</tt>) <strong>hebrew_month_to_s</strong>(month)
1462
1574
 
1463
1575
 
1464
1576
 
@@ -1466,8 +1578,8 @@ it should respond accordingly.</p>
1466
1578
 
1467
1579
  </h3><div class="docstring">
1468
1580
  <div class="discussion">
1469
- <p class="note returns_void">This method returns an undefined value.</p>
1470
- <p>Move back one day.</p>
1581
+
1582
+ <p>Get the name of the given Hebrew month.</p>
1471
1583
 
1472
1584
 
1473
1585
  </div>
@@ -1481,77 +1593,23 @@ it should respond accordingly.</p>
1481
1593
  <pre class="lines">
1482
1594
 
1483
1595
 
1484
- 214
1485
- 215
1486
- 216
1487
- 217
1488
- 218
1489
- 219
1490
- 220
1491
- 221
1492
- 222
1493
- 223
1494
- 224
1495
- 225
1496
- 226
1497
- 227
1498
- 228
1499
- 229
1500
- 230
1501
- 231
1502
- 232
1503
- 233
1504
- 234
1505
- 235
1506
- 236
1507
- 237
1508
- 238
1509
- 239
1510
- 240
1511
- 241
1512
- 242
1513
- 243
1514
- 244
1515
- 245
1516
- 246
1517
- 247</pre>
1596
+ 277
1597
+ 278
1598
+ 279
1599
+ 280
1600
+ 281
1601
+ 282
1602
+ 283</pre>
1518
1603
  </td>
1519
1604
  <td>
1520
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 214</span>
1521
-
1522
- <span class='kw'>def</span> <span class='id identifier rubyid_back'>back</span>
1523
- <span class='comment'># Change Gregorian date
1524
- </span> <span class='kw'>if</span> <span class='ivar'>@date</span> <span class='op'>==</span> <span class='int'>1</span>
1525
- <span class='kw'>if</span> <span class='ivar'>@month</span> <span class='op'>==</span> <span class='int'>1</span>
1526
- <span class='ivar'>@month</span> <span class='op'>=</span> <span class='int'>12</span>
1527
- <span class='ivar'>@year</span> <span class='op'>-=</span> <span class='int'>1</span>
1528
- <span class='kw'>else</span>
1529
- <span class='ivar'>@month</span> <span class='op'>-=</span> <span class='int'>1</span>
1530
- <span class='kw'>end</span>
1531
-
1532
- <span class='comment'># change to last day of previous month
1533
- </span> <span class='ivar'>@date</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day_of_month'>last_day_of_month</span>
1534
- <span class='kw'>else</span>
1535
- <span class='ivar'>@date</span> <span class='op'>-=</span> <span class='int'>1</span>
1536
- <span class='kw'>end</span>
1605
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 277</span>
1537
1606
 
1538
- <span class='comment'># Change Hebrew date
1539
- </span> <span class='kw'>if</span> <span class='ivar'>@hebrew_date</span> <span class='op'>==</span> <span class='int'>1</span>
1540
- <span class='kw'>if</span> <span class='ivar'>@hebrew_month</span> <span class='op'>==</span> <span class='int'>1</span> <span class='comment'># Nisan
1541
- </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>
1542
- <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
1543
- </span> <span class='ivar'>@hebrew_year</span> <span class='op'>-=</span> <span class='int'>1</span>
1544
- <span class='ivar'>@hebrew_month</span> <span class='op'>-=</span> <span class='int'>1</span>
1545
- <span class='kw'>else</span>
1546
- <span class='ivar'>@hebrew_month</span> <span class='op'>-=</span> <span class='int'>1</span>
1547
- <span class='kw'>end</span>
1548
- <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>
1549
- <span class='kw'>else</span>
1550
- <span class='ivar'>@hebrew_date</span> <span class='op'>-=</span> <span class='int'>1</span>
1607
+ <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='rparen'>)</span>
1608
+ <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>
1609
+ <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Teves</span><span class='tstring_end'>&#39;</span></span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_ashkenaz'>ashkenaz</span>
1610
+ <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Tevet</span><span class='tstring_end'>&#39;</span></span>
1551
1611
  <span class='kw'>end</span>
1552
-
1553
- <span class='comment'># Change the absolute date
1554
- </span> <span class='ivar'>@abs_date</span> <span class='op'>-=</span> <span class='int'>1</span>
1612
+ <span class='id identifier rubyid_name'>name</span>
1555
1613
  <span class='kw'>end</span></pre>
1556
1614
  </td>
1557
1615
  </tr>
@@ -1559,9 +1617,9 @@ it should respond accordingly.</p>
1559
1617
  </div>
1560
1618
 
1561
1619
  <div class="method_details ">
1562
- <h3 class="signature " id="clone-instance_method">
1620
+ <h3 class="signature " id="last_month_of_hebrew_year-class_method">
1563
1621
 
1564
- - (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>clone</strong>
1622
+ + (<tt>Integer</tt>) <strong>last_month_of_hebrew_year</strong>(year)
1565
1623
 
1566
1624
 
1567
1625
 
@@ -1570,25 +1628,479 @@ it should respond accordingly.</p>
1570
1628
  </h3><div class="docstring">
1571
1629
  <div class="discussion">
1572
1630
 
1573
- <p>Get a clone of this object.</p>
1631
+ <p>The last month in the Hebrew year (12 or 13).</p>
1574
1632
 
1575
1633
 
1576
1634
  </div>
1577
1635
  </div>
1578
1636
  <div class="tags">
1579
-
1580
- <p class="tag_title">Returns:</p>
1581
- <ul class="return">
1637
+ <p class="tag_title">Parameters:</p>
1638
+ <ul class="param">
1582
1639
 
1583
1640
  <li>
1584
1641
 
1642
+ <span class='name'>year</span>
1585
1643
 
1586
- <span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
1587
1644
 
1645
+ <span class='type'>(<tt>Integer</tt>)</span>
1588
1646
 
1589
1647
 
1590
- </li>
1591
-
1648
+
1649
+ &mdash;
1650
+ <div class='inline'>
1651
+ <p>the Hebrew year.</p>
1652
+ </div>
1653
+
1654
+ </li>
1655
+
1656
+ </ul>
1657
+
1658
+ <p class="tag_title">Returns:</p>
1659
+ <ul class="return">
1660
+
1661
+ <li>
1662
+
1663
+
1664
+ <span class='type'>(<tt>Integer</tt>)</span>
1665
+
1666
+
1667
+
1668
+ </li>
1669
+
1670
+ </ul>
1671
+
1672
+ </div><table class="source_code">
1673
+ <tr>
1674
+ <td>
1675
+ <pre class="lines">
1676
+
1677
+
1678
+ 354
1679
+ 355
1680
+ 356</pre>
1681
+ </td>
1682
+ <td>
1683
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 354</span>
1684
+
1685
+ <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>
1686
+ <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>
1687
+ <span class='kw'>end</span></pre>
1688
+ </td>
1689
+ </tr>
1690
+ </table>
1691
+ </div>
1692
+
1693
+ <div class="method_details ">
1694
+ <h3 class="signature " id="new_from_hebrew-class_method">
1695
+
1696
+ + (<tt>Object</tt>) <strong>new_from_hebrew</strong>(year, month, date)
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+ </h3><div class="docstring">
1703
+ <div class="discussion">
1704
+
1705
+ <p>Create a HebrewDate with initialized Hebrew date values.</p>
1706
+
1707
+
1708
+ </div>
1709
+ </div>
1710
+ <div class="tags">
1711
+ <p class="tag_title">Parameters:</p>
1712
+ <ul class="param">
1713
+
1714
+ <li>
1715
+
1716
+ <span class='name'>year</span>
1717
+
1718
+
1719
+ <span class='type'>(<tt>Integer</tt>)</span>
1720
+
1721
+
1722
+
1723
+ &mdash;
1724
+ <div class='inline'>
1725
+ <p>the Hebrew year (e.g. 5774)</p>
1726
+ </div>
1727
+
1728
+ </li>
1729
+
1730
+ <li>
1731
+
1732
+ <span class='name'>month</span>
1733
+
1734
+
1735
+ <span class='type'>(<tt>Integer</tt>)</span>
1736
+
1737
+
1738
+
1739
+ &mdash;
1740
+ <div class='inline'>
1741
+ <p>the Hebrew month (1-13)</p>
1742
+ </div>
1743
+
1744
+ </li>
1745
+
1746
+ <li>
1747
+
1748
+ <span class='name'>date</span>
1749
+
1750
+
1751
+ <span class='type'>(<tt>Integer</tt>)</span>
1752
+
1753
+
1754
+
1755
+ &mdash;
1756
+ <div class='inline'>
1757
+ <p>the day of the Hebrew month (1-30)</p>
1758
+ </div>
1759
+
1760
+ </li>
1761
+
1762
+ </ul>
1763
+
1764
+
1765
+ </div><table class="source_code">
1766
+ <tr>
1767
+ <td>
1768
+ <pre class="lines">
1769
+
1770
+
1771
+ 121
1772
+ 122
1773
+ 123
1774
+ 124
1775
+ 125</pre>
1776
+ </td>
1777
+ <td>
1778
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 121</span>
1779
+
1780
+ <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>
1781
+ <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>
1782
+ <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='rparen'>)</span>
1783
+ <span class='id identifier rubyid_d'>d</span>
1784
+ <span class='kw'>end</span></pre>
1785
+ </td>
1786
+ </tr>
1787
+ </table>
1788
+ </div>
1789
+
1790
+ </div>
1791
+
1792
+ <div id="instance_method_details" class="method_details_list">
1793
+ <h2>Instance Method Details</h2>
1794
+
1795
+
1796
+ <div class="method_details first">
1797
+ <h3 class="signature first" id="+-instance_method">
1798
+
1799
+ - (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>+</strong>(other_date)
1800
+
1801
+
1802
+
1803
+
1804
+
1805
+ </h3><div class="docstring">
1806
+ <div class="discussion">
1807
+
1808
+ <p>Add the dates specified (in days).</p>
1809
+
1810
+
1811
+ </div>
1812
+ </div>
1813
+ <div class="tags">
1814
+ <p class="tag_title">Parameters:</p>
1815
+ <ul class="param">
1816
+
1817
+ <li>
1818
+
1819
+ <span class='name'>other_date</span>
1820
+
1821
+
1822
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1823
+
1824
+
1825
+
1826
+ &mdash;
1827
+ <div class='inline'>
1828
+ <p>the days to add.</p>
1829
+ </div>
1830
+
1831
+ </li>
1832
+
1833
+ </ul>
1834
+
1835
+ <p class="tag_title">Returns:</p>
1836
+ <ul class="return">
1837
+
1838
+ <li>
1839
+
1840
+
1841
+ <span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
1842
+
1843
+
1844
+
1845
+ </li>
1846
+
1847
+ </ul>
1848
+
1849
+ </div><table class="source_code">
1850
+ <tr>
1851
+ <td>
1852
+ <pre class="lines">
1853
+
1854
+
1855
+ 88
1856
+ 89
1857
+ 90
1858
+ 91</pre>
1859
+ </td>
1860
+ <td>
1861
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 88</span>
1862
+
1863
+ <span class='kw'>def</span> <span class='op'>+</span><span class='lparen'>(</span><span class='id identifier rubyid_other_date'>other_date</span><span class='rparen'>)</span>
1864
+ <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_to_date'>to_date</span> <span class='op'>+</span> <span class='id identifier rubyid_other_date'>other_date</span>
1865
+ <span class='const'>HebrewDate</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_day'>day</span><span class='rparen'>)</span>
1866
+ <span class='kw'>end</span></pre>
1867
+ </td>
1868
+ </tr>
1869
+ </table>
1870
+ </div>
1871
+
1872
+ <div class="method_details ">
1873
+ <h3 class="signature " id="--instance_method">
1874
+
1875
+ - (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>-</strong>(other_date)
1876
+
1877
+
1878
+
1879
+
1880
+
1881
+ </h3><div class="docstring">
1882
+ <div class="discussion">
1883
+
1884
+ <p>Subtract the dates specified (in days).</p>
1885
+
1886
+
1887
+ </div>
1888
+ </div>
1889
+ <div class="tags">
1890
+ <p class="tag_title">Parameters:</p>
1891
+ <ul class="param">
1892
+
1893
+ <li>
1894
+
1895
+ <span class='name'>other_date</span>
1896
+
1897
+
1898
+ <span class='type'>(<tt>Fixnum</tt>)</span>
1899
+
1900
+
1901
+
1902
+ &mdash;
1903
+ <div class='inline'>
1904
+ <p>the days to subtract.</p>
1905
+ </div>
1906
+
1907
+ </li>
1908
+
1909
+ </ul>
1910
+
1911
+ <p class="tag_title">Returns:</p>
1912
+ <ul class="return">
1913
+
1914
+ <li>
1915
+
1916
+
1917
+ <span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
1918
+
1919
+
1920
+
1921
+ </li>
1922
+
1923
+ </ul>
1924
+
1925
+ </div><table class="source_code">
1926
+ <tr>
1927
+ <td>
1928
+ <pre class="lines">
1929
+
1930
+
1931
+ 96
1932
+ 97
1933
+ 98
1934
+ 99</pre>
1935
+ </td>
1936
+ <td>
1937
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 96</span>
1938
+
1939
+ <span class='kw'>def</span> <span class='op'>-</span><span class='lparen'>(</span><span class='id identifier rubyid_other_date'>other_date</span><span class='rparen'>)</span>
1940
+ <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_to_date'>to_date</span> <span class='op'>-</span> <span class='id identifier rubyid_other_date'>other_date</span>
1941
+ <span class='const'>HebrewDate</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_date'>date</span><span class='period'>.</span><span class='id identifier rubyid_day'>day</span><span class='rparen'>)</span>
1942
+ <span class='kw'>end</span></pre>
1943
+ </td>
1944
+ </tr>
1945
+ </table>
1946
+ </div>
1947
+
1948
+ <div class="method_details ">
1949
+ <h3 class="signature " id="back-instance_method">
1950
+
1951
+ - (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>back</strong>
1952
+
1953
+
1954
+
1955
+
1956
+
1957
+ </h3><div class="docstring">
1958
+ <div class="discussion">
1959
+
1960
+ <p>Move back one day.</p>
1961
+
1962
+
1963
+ </div>
1964
+ </div>
1965
+ <div class="tags">
1966
+
1967
+ <p class="tag_title">Returns:</p>
1968
+ <ul class="return">
1969
+
1970
+ <li>
1971
+
1972
+
1973
+ <span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
1974
+
1975
+
1976
+
1977
+ &mdash;
1978
+ <div class='inline'>
1979
+ <p>the same HebrewDate object again, for chaining.</p>
1980
+ </div>
1981
+
1982
+ </li>
1983
+
1984
+ </ul>
1985
+
1986
+ </div><table class="source_code">
1987
+ <tr>
1988
+ <td>
1989
+ <pre class="lines">
1990
+
1991
+
1992
+ 233
1993
+ 234
1994
+ 235
1995
+ 236
1996
+ 237
1997
+ 238
1998
+ 239
1999
+ 240
2000
+ 241
2001
+ 242
2002
+ 243
2003
+ 244
2004
+ 245
2005
+ 246
2006
+ 247
2007
+ 248
2008
+ 249
2009
+ 250
2010
+ 251
2011
+ 252
2012
+ 253
2013
+ 254
2014
+ 255
2015
+ 256
2016
+ 257
2017
+ 258
2018
+ 259
2019
+ 260
2020
+ 261
2021
+ 262
2022
+ 263
2023
+ 264
2024
+ 265
2025
+ 266
2026
+ 267
2027
+ 268</pre>
2028
+ </td>
2029
+ <td>
2030
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 233</span>
2031
+
2032
+ <span class='kw'>def</span> <span class='id identifier rubyid_back'>back</span>
2033
+ <span class='comment'># Change Gregorian date
2034
+ </span> <span class='kw'>if</span> <span class='ivar'>@date</span> <span class='op'>==</span> <span class='int'>1</span>
2035
+ <span class='kw'>if</span> <span class='ivar'>@month</span> <span class='op'>==</span> <span class='int'>1</span>
2036
+ <span class='ivar'>@month</span> <span class='op'>=</span> <span class='int'>12</span>
2037
+ <span class='ivar'>@year</span> <span class='op'>-=</span> <span class='int'>1</span>
2038
+ <span class='kw'>else</span>
2039
+ <span class='ivar'>@month</span> <span class='op'>-=</span> <span class='int'>1</span>
2040
+ <span class='kw'>end</span>
2041
+
2042
+ <span class='comment'># change to last day of previous month
2043
+ </span> <span class='ivar'>@date</span> <span class='op'>=</span> <span class='id identifier rubyid_last_day_of_month'>last_day_of_month</span>
2044
+ <span class='kw'>else</span>
2045
+ <span class='ivar'>@date</span> <span class='op'>-=</span> <span class='int'>1</span>
2046
+ <span class='kw'>end</span>
2047
+
2048
+ <span class='comment'># Change Hebrew date
2049
+ </span> <span class='kw'>if</span> <span class='ivar'>@hebrew_date</span> <span class='op'>==</span> <span class='int'>1</span>
2050
+ <span class='kw'>if</span> <span class='ivar'>@hebrew_month</span> <span class='op'>==</span> <span class='int'>1</span> <span class='comment'># Nisan
2051
+ </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>
2052
+ <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
2053
+ </span> <span class='ivar'>@hebrew_year</span> <span class='op'>-=</span> <span class='int'>1</span>
2054
+ <span class='ivar'>@hebrew_month</span> <span class='op'>-=</span> <span class='int'>1</span>
2055
+ <span class='kw'>else</span>
2056
+ <span class='ivar'>@hebrew_month</span> <span class='op'>-=</span> <span class='int'>1</span>
2057
+ <span class='kw'>end</span>
2058
+ <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>
2059
+ <span class='kw'>else</span>
2060
+ <span class='ivar'>@hebrew_date</span> <span class='op'>-=</span> <span class='int'>1</span>
2061
+ <span class='kw'>end</span>
2062
+
2063
+ <span class='comment'># Change the absolute date
2064
+ </span> <span class='ivar'>@abs_date</span> <span class='op'>-=</span> <span class='int'>1</span>
2065
+
2066
+ <span class='kw'>self</span>
2067
+ <span class='kw'>end</span></pre>
2068
+ </td>
2069
+ </tr>
2070
+ </table>
2071
+ </div>
2072
+
2073
+ <div class="method_details ">
2074
+ <h3 class="signature " id="clone-instance_method">
2075
+
2076
+ - (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>clone</strong>
2077
+
2078
+
2079
+
2080
+
2081
+
2082
+ </h3><div class="docstring">
2083
+ <div class="discussion">
2084
+
2085
+ <p>Get a clone of this object.</p>
2086
+
2087
+
2088
+ </div>
2089
+ </div>
2090
+ <div class="tags">
2091
+
2092
+ <p class="tag_title">Returns:</p>
2093
+ <ul class="return">
2094
+
2095
+ <li>
2096
+
2097
+
2098
+ <span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
2099
+
2100
+
2101
+
2102
+ </li>
2103
+
1592
2104
  </ul>
1593
2105
 
1594
2106
  </div><table class="source_code">
@@ -1597,12 +2109,12 @@ it should respond accordingly.</p>
1597
2109
  <pre class="lines">
1598
2110
 
1599
2111
 
1600
- 96
1601
- 97
1602
- 98</pre>
2112
+ 113
2113
+ 114
2114
+ 115</pre>
1603
2115
  </td>
1604
2116
  <td>
1605
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 96</span>
2117
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 113</span>
1606
2118
 
1607
2119
  <span class='kw'>def</span> <span class='id identifier rubyid_clone'>clone</span>
1608
2120
  <span class='const'>HebrewDate</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_to_date'>to_date</span><span class='rparen'>)</span>
@@ -1656,12 +2168,12 @@ it should respond accordingly.</p>
1656
2168
  <pre class="lines">
1657
2169
 
1658
2170
 
1659
- 292
1660
- 293
1661
- 294</pre>
2171
+ 319
2172
+ 320
2173
+ 321</pre>
1662
2174
  </td>
1663
2175
  <td>
1664
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 292</span>
2176
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 319</span>
1665
2177
 
1666
2178
  <span class='kw'>def</span> <span class='id identifier rubyid_day'>day</span>
1667
2179
  <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'>&#39;</span><span class='tstring_content'>%w</span><span class='tstring_end'>&#39;</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>
@@ -1674,7 +2186,7 @@ it should respond accordingly.</p>
1674
2186
  <div class="method_details ">
1675
2187
  <h3 class="signature " id="forward-instance_method">
1676
2188
 
1677
- - (<tt>void</tt>) <strong>forward</strong>
2189
+ - (<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>) <strong>forward</strong>
1678
2190
 
1679
2191
 
1680
2192
 
@@ -1682,7 +2194,7 @@ it should respond accordingly.</p>
1682
2194
 
1683
2195
  </h3><div class="docstring">
1684
2196
  <div class="discussion">
1685
- <p class="note returns_void">This method returns an undefined value.</p>
2197
+
1686
2198
  <p>Move forward one day.</p>
1687
2199
 
1688
2200
 
@@ -1690,6 +2202,24 @@ it should respond accordingly.</p>
1690
2202
  </div>
1691
2203
  <div class="tags">
1692
2204
 
2205
+ <p class="tag_title">Returns:</p>
2206
+ <ul class="return">
2207
+
2208
+ <li>
2209
+
2210
+
2211
+ <span class='type'>(<tt><span class='object_link'><a href="" title="HebrewDate (class)">HebrewDate</a></span></tt>)</span>
2212
+
2213
+
2214
+
2215
+ &mdash;
2216
+ <div class='inline'>
2217
+ <p>the same HebrewDate object again, for chaining.</p>
2218
+ </div>
2219
+
2220
+ </li>
2221
+
2222
+ </ul>
1693
2223
 
1694
2224
  </div><table class="source_code">
1695
2225
  <tr>
@@ -1697,23 +2227,6 @@ it should respond accordingly.</p>
1697
2227
  <pre class="lines">
1698
2228
 
1699
2229
 
1700
- 171
1701
- 172
1702
- 173
1703
- 174
1704
- 175
1705
- 176
1706
- 177
1707
- 178
1708
- 179
1709
- 180
1710
- 181
1711
- 182
1712
- 183
1713
- 184
1714
- 185
1715
- 186
1716
- 187
1717
2230
  188
1718
2231
  189
1719
2232
  190
@@ -1736,10 +2249,29 @@ it should respond accordingly.</p>
1736
2249
  207
1737
2250
  208
1738
2251
  209
1739
- 210</pre>
2252
+ 210
2253
+ 211
2254
+ 212
2255
+ 213
2256
+ 214
2257
+ 215
2258
+ 216
2259
+ 217
2260
+ 218
2261
+ 219
2262
+ 220
2263
+ 221
2264
+ 222
2265
+ 223
2266
+ 224
2267
+ 225
2268
+ 226
2269
+ 227
2270
+ 228
2271
+ 229</pre>
1740
2272
  </td>
1741
2273
  <td>
1742
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 171</span>
2274
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 188</span>
1743
2275
 
1744
2276
  <span class='kw'>def</span> <span class='id identifier rubyid_forward'>forward</span>
1745
2277
  <span class='comment'># Change Gregorian date
@@ -1780,6 +2312,8 @@ it should respond accordingly.</p>
1780
2312
 
1781
2313
  <span class='comment'># increment the absolute date
1782
2314
  </span> <span class='ivar'>@abs_date</span> <span class='op'>+=</span> <span class='int'>1</span>
2315
+
2316
+ <span class='kw'>self</span>
1783
2317
  <span class='kw'>end</span></pre>
1784
2318
  </td>
1785
2319
  </tr>
@@ -1789,7 +2323,7 @@ it should respond accordingly.</p>
1789
2323
  <div class="method_details ">
1790
2324
  <h3 class="signature " id="hebrew_leap_year?-instance_method">
1791
2325
 
1792
- - (<tt>Boolean</tt>) <strong>hebrew_leap_year?</strong>(year = nil)
2326
+ - (<tt>Boolean</tt>) <strong>hebrew_leap_year?</strong>
1793
2327
 
1794
2328
 
1795
2329
 
@@ -1804,29 +2338,7 @@ it should respond accordingly.</p>
1804
2338
  </div>
1805
2339
  </div>
1806
2340
  <div class="tags">
1807
- <p class="tag_title">Parameters:</p>
1808
- <ul class="param">
1809
-
1810
- <li>
1811
-
1812
- <span class='name'>year</span>
1813
-
1814
-
1815
- <span class='type'>(<tt>Integer</tt>)</span>
1816
-
1817
-
1818
- <em class="default">(defaults to: <tt>nil</tt>)</em>
1819
-
1820
-
1821
- &mdash;
1822
- <div class='inline'>
1823
- <p>Used internally.</p>
1824
- </div>
1825
-
1826
- </li>
1827
2341
 
1828
- </ul>
1829
-
1830
2342
  <p class="tag_title">Returns:</p>
1831
2343
  <ul class="return">
1832
2344
 
@@ -1847,17 +2359,15 @@ it should respond accordingly.</p>
1847
2359
  <pre class="lines">
1848
2360
 
1849
2361
 
1850
- 319
1851
- 320
1852
- 321
1853
- 322</pre>
2362
+ 368
2363
+ 369
2364
+ 370</pre>
1854
2365
  </td>
1855
2366
  <td>
1856
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 319</span>
2367
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 368</span>
1857
2368
 
1858
- <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='op'>=</span><span class='kw'>nil</span><span class='rparen'>)</span>
1859
- <span class='id identifier rubyid_year'>year</span> <span class='op'>||=</span> <span class='ivar'>@hebrew_year</span>
1860
- <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'>&lt;</span> <span class='int'>7</span>
2369
+ <span class='kw'>def</span> <span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span>
2370
+ <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>
1861
2371
  <span class='kw'>end</span></pre>
1862
2372
  </td>
1863
2373
  </tr>
@@ -1903,23 +2413,15 @@ it should respond accordingly.</p>
1903
2413
  <pre class="lines">
1904
2414
 
1905
2415
 
1906
- 251
1907
- 252
1908
- 253
1909
- 254
1910
- 255
1911
- 256
1912
- 257</pre>
2416
+ 272
2417
+ 273
2418
+ 274</pre>
1913
2419
  </td>
1914
2420
  <td>
1915
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 251</span>
2421
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 272</span>
1916
2422
 
1917
2423
  <span class='kw'>def</span> <span class='id identifier rubyid_hebrew_month_to_s'>hebrew_month_to_s</span>
1918
- <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='ivar'>@hebrew_month</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span>
1919
- <span class='kw'>if</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Teves</span><span class='tstring_end'>&#39;</span></span> <span class='op'>&amp;&amp;</span> <span class='op'>!</span><span class='ivar'>@ashkenaz</span>
1920
- <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Tevet</span><span class='tstring_end'>&#39;</span></span>
1921
- <span class='kw'>end</span>
1922
- <span class='id identifier rubyid_name'>name</span>
2424
+ <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='rparen'>)</span>
1923
2425
  <span class='kw'>end</span></pre>
1924
2426
  </td>
1925
2427
  </tr>
@@ -1987,24 +2489,24 @@ it should respond accordingly.</p>
1987
2489
  <pre class="lines">
1988
2490
 
1989
2491
 
1990
- 333
1991
- 334
1992
- 335
1993
- 336
1994
- 337
1995
- 338
1996
- 339
1997
- 340
1998
- 341
1999
- 342
2000
- 343
2001
- 344
2002
- 345
2003
- 346
2004
- 347</pre>
2492
+ 375
2493
+ 376
2494
+ 377
2495
+ 378
2496
+ 379
2497
+ 380
2498
+ 381
2499
+ 382
2500
+ 383
2501
+ 384
2502
+ 385
2503
+ 386
2504
+ 387
2505
+ 388
2506
+ 389</pre>
2005
2507
  </td>
2006
2508
  <td>
2007
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 333</span>
2509
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 375</span>
2008
2510
 
2009
2511
  <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>
2010
2512
  <span class='id identifier rubyid_month'>month</span> <span class='op'>||=</span> <span class='ivar'>@hebrew_month</span>
@@ -2087,25 +2589,25 @@ it should respond accordingly.</p>
2087
2589
  <pre class="lines">
2088
2590
 
2089
2591
 
2090
- 299
2091
- 300
2092
- 301
2093
- 302
2094
- 303
2095
- 304
2096
- 305
2097
- 306
2098
- 307
2099
- 308
2100
- 309
2101
- 310
2102
- 311
2103
- 312
2104
- 313
2105
- 314</pre>
2592
+ 326
2593
+ 327
2594
+ 328
2595
+ 329
2596
+ 330
2597
+ 331
2598
+ 332
2599
+ 333
2600
+ 334
2601
+ 335
2602
+ 336
2603
+ 337
2604
+ 338
2605
+ 339
2606
+ 340
2607
+ 341</pre>
2106
2608
  </td>
2107
2609
  <td>
2108
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 299</span>
2610
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 326</span>
2109
2611
 
2110
2612
  <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>
2111
2613
  <span class='id identifier rubyid_month'>month</span> <span class='op'>||=</span> <span class='ivar'>@month</span>
@@ -2167,15 +2669,15 @@ it should respond accordingly.</p>
2167
2669
  <pre class="lines">
2168
2670
 
2169
2671
 
2170
- 326
2171
- 327
2172
- 328</pre>
2672
+ 362
2673
+ 363
2674
+ 364</pre>
2173
2675
  </td>
2174
2676
  <td>
2175
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 326</span>
2677
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 362</span>
2176
2678
 
2177
2679
  <span class='kw'>def</span> <span class='id identifier rubyid_last_month_of_hebrew_year'>last_month_of_hebrew_year</span>
2178
- <span class='id identifier rubyid_hebrew_leap_year?'>hebrew_leap_year?</span> <span class='op'>?</span> <span class='int'>13</span> <span class='op'>:</span> <span class='int'>12</span>
2680
+ <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>
2179
2681
  <span class='kw'>end</span></pre>
2180
2682
  </td>
2181
2683
  </tr>
@@ -2260,28 +2762,28 @@ it should respond accordingly.</p>
2260
2762
  <pre class="lines">
2261
2763
 
2262
2764
 
2263
- 115
2264
- 116
2265
- 117
2266
- 118
2267
- 119
2268
- 120
2269
- 121
2270
- 122
2271
- 123
2272
- 124
2273
- 125
2274
- 126
2275
- 127
2276
- 128
2277
- 129
2278
- 130
2279
- 131
2280
2765
  132
2281
- 133</pre>
2766
+ 133
2767
+ 134
2768
+ 135
2769
+ 136
2770
+ 137
2771
+ 138
2772
+ 139
2773
+ 140
2774
+ 141
2775
+ 142
2776
+ 143
2777
+ 144
2778
+ 145
2779
+ 146
2780
+ 147
2781
+ 148
2782
+ 149
2783
+ 150</pre>
2282
2784
  </td>
2283
2785
  <td>
2284
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 115</span>
2786
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 132</span>
2285
2787
 
2286
2788
  <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>
2287
2789
  <span class='comment'># precond should be 1-&gt;12 anyways, but just in case...
@@ -2385,31 +2887,31 @@ it should respond accordingly.</p>
2385
2887
  <pre class="lines">
2386
2888
 
2387
2889
 
2388
- 140
2389
- 141
2390
- 142
2391
- 143
2392
- 144
2393
- 145
2394
- 146
2395
- 147
2396
- 148
2397
- 149
2398
- 150
2399
- 151
2400
- 152
2401
- 153
2402
- 154
2403
- 155
2404
- 156
2405
2890
  157
2406
2891
  158
2407
2892
  159
2408
2893
  160
2409
- 161</pre>
2894
+ 161
2895
+ 162
2896
+ 163
2897
+ 164
2898
+ 165
2899
+ 166
2900
+ 167
2901
+ 168
2902
+ 169
2903
+ 170
2904
+ 171
2905
+ 172
2906
+ 173
2907
+ 174
2908
+ 175
2909
+ 176
2910
+ 177
2911
+ 178</pre>
2410
2912
  </td>
2411
2913
  <td>
2412
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 140</span>
2914
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 157</span>
2413
2915
 
2414
2916
  <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='rparen'>)</span>
2415
2917
  <span class='kw'>return</span> <span class='tstring'><span class='tstring_beg'>&quot;</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'>&quot;</span></span> <span class='kw'>if</span> <span class='id identifier rubyid_year'>year</span> <span class='op'>&lt;</span> <span class='int'>0</span>
@@ -2453,18 +2955,18 @@ it should respond accordingly.</p>
2453
2955
  <p>Extend the Date strftime method by replacing Hebrew fields. You can denote
2454
2956
  Hebrew fields by using the * flag. Supported flags are:</p>
2455
2957
 
2456
- <pre class="code ruby"><code class="ruby">* %*Y - Hebrew year
2457
- * %*m - Hebrew month, zero-padded
2458
- * %*_m - Hebrew month, blank-padded
2459
- * %*-m - Hebrew month, no-padded
2460
- * %*B - Hebrew month, full name
2461
- * %*^B - Hebrew month, full name uppercase
2462
- * %*b - Hebrew month, 3 letters
2463
- * %*^b - Hebrew month, 3 letters uppercase
2464
- * %*h - same as %*b
2465
- * %*d - Hebrew day of month, zero-padded
2466
- * %*-d - Hebrew day of month, no-padded
2467
- * %*e - Hebrew day of month, blank-padded</code></pre>
2958
+ <pre class="code ruby"><code class="ruby">* *Y - Hebrew year
2959
+ * *m - Hebrew month, zero-padded
2960
+ * *_m - Hebrew month, blank-padded
2961
+ * *-m - Hebrew month, no-padded
2962
+ * *B - Hebrew month, full name
2963
+ * *^B - Hebrew month, full name uppercase
2964
+ * *b - Hebrew month, 3 letters
2965
+ * *^b - Hebrew month, 3 letters uppercase
2966
+ * *h - same as %*b
2967
+ * *d - Hebrew day of month, zero-padded
2968
+ * *-d - Hebrew day of month, no-padded
2969
+ * *e - Hebrew day of month, blank-padded</code></pre>
2468
2970
 
2469
2971
 
2470
2972
  </div>
@@ -2506,37 +3008,39 @@ Hebrew fields by using the * flag. Supported flags are:</p>
2506
3008
  <pre class="lines">
2507
3009
 
2508
3010
 
2509
- 275
2510
- 276
2511
- 277
2512
- 278
2513
- 279
2514
- 280
2515
- 281
2516
- 282
2517
- 283
2518
- 284
2519
- 285
2520
- 286
2521
- 287
2522
- 288</pre>
3011
+ 301
3012
+ 302
3013
+ 303
3014
+ 304
3015
+ 305
3016
+ 306
3017
+ 307
3018
+ 308
3019
+ 309
3020
+ 310
3021
+ 311
3022
+ 312
3023
+ 313
3024
+ 314
3025
+ 315</pre>
2523
3026
  </td>
2524
3027
  <td>
2525
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 275</span>
3028
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 301</span>
2526
3029
 
2527
3030
  <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>
2528
- <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'>&#39;</span><span class='tstring_content'>%*Y</span><span class='tstring_end'>&#39;</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'>
2529
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*m</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>0</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
2530
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*_m</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
2531
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*-m</span><span class='tstring_end'>&#39;</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'>
2532
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*B</span><span class='tstring_end'>&#39;</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'>
2533
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*^B</span><span class='tstring_end'>&#39;</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'>
2534
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*b</span><span class='tstring_end'>&#39;</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'>
2535
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*^b</span><span class='tstring_end'>&#39;</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'>
2536
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*h</span><span class='tstring_end'>&#39;</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'>
2537
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*d</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>0</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
2538
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*-d</span><span class='tstring_end'>&#39;</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'>
2539
- </span><span class='id identifier rubyid_ .gsub!'> .gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>%*e</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
3031
+ <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'>&#39;</span><span class='tstring_content'>*Y</span><span class='tstring_end'>&#39;</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'>
3032
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*m</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>0</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
3033
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*_m</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
3034
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*-m</span><span class='tstring_end'>&#39;</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'>
3035
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*B</span><span class='tstring_end'>&#39;</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'>
3036
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*^B</span><span class='tstring_end'>&#39;</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'>
3037
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*b</span><span class='tstring_end'>&#39;</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'>
3038
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*^b</span><span class='tstring_end'>&#39;</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'>
3039
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*h</span><span class='tstring_end'>&#39;</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'>
3040
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*d</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'>0</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>
3041
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*-d</span><span class='tstring_end'>&#39;</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'>
3042
+ </span><span class='id identifier rubyid_ .gsub'> .gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>*e</span><span class='tstring_end'>&#39;</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'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
3043
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_format'>format</span><span class='rparen'>)</span>
2540
3044
  <span class='kw'>end</span></pre>
2541
3045
  </td>
2542
3046
  </tr>
@@ -2582,12 +3086,12 @@ Hebrew fields by using the * flag. Supported flags are:</p>
2582
3086
  <pre class="lines">
2583
3087
 
2584
3088
 
2585
- 165
2586
- 166
2587
- 167</pre>
3089
+ 182
3090
+ 183
3091
+ 184</pre>
2588
3092
  </td>
2589
3093
  <td>
2590
- <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 165</span>
3094
+ <pre class="code"><span class="info file"># File 'lib/hebrew_date.rb', line 182</span>
2591
3095
 
2592
3096
  <span class='kw'>def</span> <span class='id identifier rubyid_to_date'>to_date</span>
2593
3097
  <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>
@@ -2602,7 +3106,7 @@ Hebrew fields by using the * flag. Supported flags are:</p>
2602
3106
  </div>
2603
3107
 
2604
3108
  <div id="footer">
2605
- Generated on Thu Jan 16 19:44:45 2014 by
3109
+ Generated on Sun Jan 26 12:16:13 2014 by
2606
3110
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2607
3111
  0.8.7.3 (ruby-2.0.0).
2608
3112
  </div>