Date-Indian
    
    
  
  
  
view release on metacpan or search on metacpan
==============================================================================
                   Release of version 0.01 of Date::Indian
==============================================================================
NAME
    Date::Indian is a pure perl module used to represent traditional Indian calender dates of Saka era.  Both Official Saka calendar dates and traditional luni-solar almanac dates are supported.
SYNOPSIS
	use Date::Indian;
	my $date = Date::Indian->new();  # Get Indian almanac date for today!
	my $d = Date::Indian->new('1990-12-20 10:30:20 -5:30'); 
        There are various calendrical services provided by the module.
	Consult documentation for details.
DESCRIPTION
	This module provides all important services needed to compile
demo/example.pl view on Meta::CPAN
# Karanam:
my %th = $d->karana_endings();
for my $t (sort keys %th){
  my $k;
  $k = 10 if $t == 0;
  $k = $t - 50 if $t >= 57;
  $k = ($t-1) % 7 if ($t >0) & ($t <57);
  print "Karana ", $karanaid->[$k], " ends at ", hms($th{$t}), "\n";
}
# Compute traditional saka date for the gregorian calendar date.
# Takes care of inter calary months.
sub greg2saka{
   my $self = shift;
   my $sun  = $self->sun();
   my ($sr, $ss, $flag) = $self -> sunriseset();
   my $day = int($self->tithi($sr/24.0)) % 30;
   my $td = Indian -> new ( jdate => $self->newmoon(), tz => '5:30');
   my ($yr,$mn,$dt,$tm) = $td->ymd();
   $sun = $td ->sun();
   my $sl = $sun->n_long();
lib/Date/Indian.pm view on Meta::CPAN
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.
=item Moon rise and Moon set
This service is provided by the method moonriseset().
($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.
=item Tithi 
This service is provided by the the following methods.
=over 4
=item  Tithi at a given time.
The method 'tithi' provides this service.
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.
=item Tithi endings.
The method 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.
=back
=item Nakshatra
=over 4
=item Nakshyatra at a given time.
The method serving is nakshyatra().
( run in 1.195 second using v1.01-cache-2.11-cpan-c333fce770f )