DateTime::Event::Jewish::Sunrise - Calculate halachically interesting times
use DateTime::Event::Jewish::Sunrise ;
my $jerusalem = DateTime::Event::Jewish::Sunrise->new([31,34,57], [35,13,0]), 'Asia/Jerusalem'; my $date = DateTime->new(year=>2010, month=>3, day=>30);
my $shkia = $jerusalem->shkia($date); my $shabbat = $jerusalem->kabbalatShabbat($date); my $netz = $jerusalem->netzHachama($date); my $night = $jerusalem->motzeiShabbat($date);
This module assumes that the earth is a smooth sphere. No allowance is made for atmospheric refraction or diffraction of light passing close to the earth's surface. To allow for refraction one uses a depression of 0.833 degrees (50' arc). As, by default, we use 1 degree of depression this is more than adequate.
The methods that return times actually return a DateTime object in the correct timezone as specified in the constructor. If an evaluation fails, e.g. no sunrise inside the Arctic cirle, undef is returned.
All times are corrected for the equation of time: the variation between sundial time and clock time.
If you call this module for a high latitude in the height of summer or the depth of winter it will return nonsense. Ask a silly question and you will get a very silly answer.
Calculations are done using the spherical cosine rule.
Constructs a new object.
An arrayref of three numbers representing degrees, minutes and seconds of latitude. North latitudes are positive, south latitudes are negative.
An arrayref of three numbers representing degrees, minutes and seconds of longitude. East longitudes are positive, west longitudes are negative.
A time-zone name as stored in the time-zone database, e.g. "Europe/London".
Calculates the length of the halachic half day in minutes. This is half the time between sunrise and sunset.
If you call this method for a high latitude in the height of summer or the depth of winter it will return 0. Ask a silly question and you will get a very silly answer.
A DateTime object, either a Gregorian or a Hebrew date. Only the day and month are relevant.
The number of degrees below the tangent plane that the sun should be at halachic sunrise/set. Default 1.
The length of the half-day in minutes. Returns 0 if there is no sensible answer, e.g. inside the Arctic circle in summer.
Returns a DateTime object of the local time of local noon.
Calculates the offset in minutes from local noon of sunrise/sunset at the given location on the specified day of the year. i.e. the time when the sun is 90 degrees from the zenith.
A DateTime object. Only the day and month are relevant. N.B. This is a Gregorian date.
The length of the ahlf day in minutes. Returns 0 if there is no sensible answer, e.g. inside the ARctic circle in summer.
Calculates the time of sunset, i.e. when the mid-line of the sun is 90degs from the zenith. The result returned has to be corrected for your distance from the standard meridian.
A DateTime object. Only the day and month are relevant.
A DateTime object.
Calculates the time of sunrise, i.e. when the mid-line of the sun is 90degs from the zenith. The result returned has to be corrected for your distance from the standard meridian.
Kabbalat Shabbat is 15 minutes before shkia, though some people use 18 minutes; Motzei Shabbat is 72 minutes after shkia (R Tam)
Other values for 'extra' give the times of Motzei Shabbat. Pre 1977 7.5 degs Post 1977 8 degs or 8.5 Fast end 6 degs
A DateTime object specifying the Gregorian date that we are interested in.
Calculates the time of halachic sunrise. This is usually when the sun is 1 degree below the tangent plane, though some people use other values.
Calculates the time of kabbalat Shabbat. This is usually 15 minutes before shkia, though some people use 18 minutes.
The number of minutes before shkia that one should use for kabbalat Shabbat. Default 15.
Motzei Shabbat according to R Tam is 72 mins after shkia. More conventionally we use the time when the sun is either 7degs or 8 degs or 8.5 degs below the horizon. Some people even use 11 or 14 degrees, but this quickly becomes ridiculous in even moderate latitudes.
For fast ends we use 6 degs (R Schneur Zalman).
The number of degrees below the tangent plane that the sun should be at motzei Shabbat. Default 8.
Convert a tupe of (degrees, minutes, seconds) to a normal form.
An arrayref of three components: degrees, minutes, seconds.
Return value type. Can be specified as 'deg', 'min', 'sec' or 'rad'; default return value is a proper coordinate tuple.
Raphael Mankin, <rapmankin at cpan.org>
<rapmankin at cpan.org>
Please report any bugs or feature requests to bug-datetime-event-jewish at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DateTime-Event-Jewish. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-datetime-event-jewish at rt.cpan.org
You can find documentation for this module with the perldoc command.
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
Copyright 2010 Raphael Mankin.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install DateTime::Event::Jewish, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.