|
Date::Indian -A module for Indian calendrical calculations. |
Date::Indian -A module for Indian calendrical calculations.
use Date::Indian;
my $date = Indian->date(
ymd => '2003:1:1',
tz => '5:30',
locn => '78:18 17:12'
);
This module is not a calander generator. It helps to wirte one by
providing essential and auxillary services.
Services offered by this module are:
1. Sun rise/set.
2. Moon rise/set.
3. Tithi at a given time.
4. Moon's constallatation at a given time.
5. Tithi ending time(s) on a given day.
6. Moon's constallation change time(s) on a given day.
7. Length of the day (sunrise to sunset).
8. Previous / current new moon date and time.
9. Next new moon date and time.
10. Rahu kalam.
11. Gulika kalam.
12. Yama gandam.
13. Durmuhurta periods.
14. Current yoga.
15. Current karana.
16. Yoga change time(s) on given day.
17. Karana change time(s) on given day.
18. Weekday.
19. Julian day.
20. ymdt ( year, month, day and time values)
21. Ayanamsa.
22.
Here is a description of the services provided by the module.
my (@y, $m, $d, $t ) = $date -> ymd();
($sunrise, $sunset, $flag) = $date -> sunriseset();
Depending the latitude and time of the year, the Sun may not rise or set at a given location. This is indicated by the $flag string data.
($moonrise, $moonset, $flag) = $date -> moonriseset();
At times the Moon may set or rise more than once on a gicen calendar day. Also some days the Moon will not rise or set. Such cases are indicated by the $flag string.
my $tithi = $date -> tithi(<time of the day>);
where the time of the day is expressed as a decimal fraction in the range 0.0 ..... 1.0 where a 0 value means at 00:00 hrs of the calendar date and 0.5 the 12:00 noon and 1.0 the begining of the next day.
tithi_endings() provides the service of itentifying when the
a tithi ending occurs on a given date.
my %t_times = $date->tithi_endings();
At times more than one tithi may end on the same calendar date and on some days none ends. Hence the method returns an hash where keys are tithi numbers in the range 0...29 and values corrosponding are times in hours at local time. Note that the hash may be empty if no tithi ends on a given calendar date.
$n_time = $date -> nakshyatra(<time of the day>)
This service is analogous to the tithi_endings service.
sun set - sun rise
on a given day provied they both are meaningful.
The usage is
$d_length = $date -> daylength();
my $pnm = $date -> newmoon();
The service allowes you to find the 'n' th new moon, if that is needed.
my $next_newmoon = $date -> newmoon(1);
my @varjyam = $date -> varjyam();
The array returned provides starting times of varjya periods on the given date. The ending time of any varjya is always 1.6 hours from the respective start time. So, ending times are seperately not provided by the method.
my ($rk_start, $rk_end) = $date -> rahu_kalam ();
The periods of time rahu kalam are controlled by time of sun rise, duration of the Sun's visibile time and the week day.
my ($gk_start, $gk_end) = $date -> gulika_kalam();
The periods of time gulika kalam are controlled by time of sun rise, duration of the Sun's visibile time and the week day.
my ($yg_start, $yg_end) = $date -> yamaganda_kalam();
The periods of time yama ganda kalam are controlled by time of sun rise, duration of the Sun's visibile time and the week day.
my ($dm1_start, $dm1_end, $dm2_start, $dm2_end) = $date -> drmuhurtam();
The periods of time durmuhurtam are controlled by time of sun rise, duration of the Sun's visibile time and the week day. There may be one or two durmuhurtha periods on a given day.
my $k = $date -> karana( <time of the day> )
my ($nav, $t) = $date -> sunchar();
where $nav is the Sun's navamsa number on the zodiac in the range 0...107. and $t represents the time of change of navamsa.
Depending on what navamsa number is returned one can understand whether the Sun is entering a different navamsa, different nakshyatra or a different sign on the zodiac.
yoga() method.
my $yoga = $date -> yoga (<time of the day>);
This method works similar to tithi_endings().
|
Date::Indian -A module for Indian calendrical calculations. |