Class: Zmanim::ZmanimCalendar
Constant Summary
collapse
- ZENITH_16_POINT_1 =
GEOMETRIC_ZENITH + 16.1
- ZENITH_8_POINT_5 =
GEOMETRIC_ZENITH + 8.5
AstronomicalCalendar::ASTRONOMICAL_ZENITH, AstronomicalCalendar::CIVIL_ZENITH, AstronomicalCalendar::GEOMETRIC_ZENITH, AstronomicalCalendar::HOUR_MILLIS, AstronomicalCalendar::MINUTE_MILLIS, AstronomicalCalendar::NAUTICAL_ZENITH
Instance Attribute Summary collapse
#astronomical_calculator, #date, #geo_location
Instance Method Summary
collapse
#sea_level_sunrise, #sea_level_sunset, #sun_transit, #sunrise, #sunrise_offset_by_degrees, #sunset, #sunset_offset_by_degrees, #temporal_hour, #utc_sea_level_sunrise, #utc_sea_level_sunset, #utc_sunrise, #utc_sunset
Constructor Details
Returns a new instance of ZmanimCalendar.
8
9
10
11
|
# File 'lib/zmanim/zmanim_calendar.rb', line 8
def initialize(opts={})
super
@candle_lighting_offset = opts[:candle_lighting_offset] || 18
end
|
Instance Attribute Details
#candle_lighting_offset ⇒ Object
Returns the value of attribute candle_lighting_offset.
3
4
5
|
# File 'lib/zmanim/zmanim_calendar.rb', line 3
def candle_lighting_offset
@candle_lighting_offset
end
|
Instance Method Details
#alos(opts = {degrees: 16.1}) ⇒ Object
22
23
24
25
|
# File 'lib/zmanim/zmanim_calendar.rb', line 22
def alos(opts={degrees: 16.1})
degrees, offset = (opts)
offset_by_minutes(sunrise_offset_by_degrees(GEOMETRIC_ZENITH + degrees), offset)
end
|
#alos_72 ⇒ Object
27
28
29
|
# File 'lib/zmanim/zmanim_calendar.rb', line 27
def alos_72
alos(offset: -72)
end
|
#candle_lighting ⇒ Object
45
46
47
|
# File 'lib/zmanim/zmanim_calendar.rb', line 45
def candle_lighting
offset_by_minutes(sea_level_sunset , -candle_lighting_offset)
end
|
#mincha_gedola(day_start = sea_level_sunrise, day_end = sea_level_sunset) ⇒ Object
61
62
63
|
# File 'lib/zmanim/zmanim_calendar.rb', line 61
def mincha_gedola(day_start=sea_level_sunrise, day_end=sea_level_sunset)
shaos_into_day(day_start, day_end, 6.5)
end
|
#mincha_ketana(day_start = sea_level_sunrise, day_end = sea_level_sunset) ⇒ Object
65
66
67
|
# File 'lib/zmanim/zmanim_calendar.rb', line 65
def mincha_ketana(day_start=sea_level_sunrise, day_end=sea_level_sunset)
shaos_into_day(day_start, day_end, 9.5)
end
|
#plag_hamincha(day_start = sea_level_sunrise, day_end = sea_level_sunset) ⇒ Object
69
70
71
|
# File 'lib/zmanim/zmanim_calendar.rb', line 69
def plag_hamincha(day_start=sea_level_sunrise, day_end=sea_level_sunset)
shaos_into_day(day_start, day_end, 10.75)
end
|
#shaah_zmanis(day_start, day_end) ⇒ Object
73
74
75
|
# File 'lib/zmanim/zmanim_calendar.rb', line 73
def shaah_zmanis(day_start, day_end)
temporal_hour(day_start, day_end)
end
|
#shaah_zmanis_by_degrees_and_offset(degrees, offset) ⇒ Object
85
86
87
88
|
# File 'lib/zmanim/zmanim_calendar.rb', line 85
def shaah_zmanis_by_degrees_and_offset(degrees, offset)
opts = {degrees: degrees, offset: offset}
shaah_zmanis(alos(opts.merge(offset: -offset)), tzais(opts))
end
|
#shaah_zmanis_gra ⇒ Object
77
78
79
|
# File 'lib/zmanim/zmanim_calendar.rb', line 77
def shaah_zmanis_gra
shaah_zmanis(sea_level_sunrise, sea_level_sunset)
end
|
#shaah_zmanis_mga ⇒ Object
81
82
83
|
# File 'lib/zmanim/zmanim_calendar.rb', line 81
def shaah_zmanis_mga
shaah_zmanis(alos_72, tzais_72)
end
|
#sof_zman_shma(day_start, day_end) ⇒ Object
33
34
35
|
# File 'lib/zmanim/zmanim_calendar.rb', line 33
def sof_zman_shma(day_start, day_end)
shaos_into_day(day_start, day_end, 3)
end
|
#sof_zman_shma_gra ⇒ Object
37
38
39
|
# File 'lib/zmanim/zmanim_calendar.rb', line 37
def sof_zman_shma_gra
sof_zman_shma(sea_level_sunrise, sea_level_sunset)
end
|
#sof_zman_shma_mga ⇒ Object
41
42
43
|
# File 'lib/zmanim/zmanim_calendar.rb', line 41
def sof_zman_shma_mga
sof_zman_shma(alos_72, tzais_72)
end
|
#sof_zman_tfila(day_start, day_end) ⇒ Object
49
50
51
|
# File 'lib/zmanim/zmanim_calendar.rb', line 49
def sof_zman_tfila(day_start, day_end)
shaos_into_day(day_start, day_end, 4)
end
|
#sof_zman_tfila_gra ⇒ Object
53
54
55
|
# File 'lib/zmanim/zmanim_calendar.rb', line 53
def sof_zman_tfila_gra
sof_zman_tfila(sea_level_sunrise, sea_level_sunset)
end
|
#sof_zman_tfila_mga ⇒ Object
57
58
59
|
# File 'lib/zmanim/zmanim_calendar.rb', line 57
def sof_zman_tfila_mga
sof_zman_tfila(alos_72, tzais_72)
end
|
#tzais(opts = {degrees: 8.5}) ⇒ Object
13
14
15
16
|
# File 'lib/zmanim/zmanim_calendar.rb', line 13
def tzais(opts={degrees: 8.5})
degrees, offset = (opts)
offset_by_minutes(sunset_offset_by_degrees(GEOMETRIC_ZENITH + degrees), offset)
end
|
#tzais_72 ⇒ Object
18
19
20
|
# File 'lib/zmanim/zmanim_calendar.rb', line 18
def tzais_72
tzais(offset: 72)
end
|