NAME
DateTime::Indic::Utils - Utility functions for Indian calendar calculation
VERSION
Version 0.3
SYNOPSIS
my $dt = DateTime->now;
my $ayanamsha = ayanamsha(J1900);
my $moon = lunar_longitude($J1900);
my $d1 = DateTime::Calendar::VikramaSamvata::Gujarati->new(
varsha => 2064,
masa => 7,
paksha => 1,
tithi => 30,
);
my $d2 = DateTime::Calendar::VikramaSamvata::Gujarati->new(
varsha => 2065,
masa => 1,
paksha => 0,
tithi => 15,
);
my $bool = lunar_on_or_before($d1, $d2);
my $previous_newmoon = newmoon(J1900, 0);
my $next_newmoon = newmoon(J1900, 1);
my $sun = solar_longitude(J1900);
my $rashi = saura_rashi(J1900);
my $year = saura_varsha($dt);
my $lunar_day = tithi_at_dt($dt);
ABSTRACT
A collection of utility functions and constants helpful in creating Indian calendars.
DESCRIPTION
Note: In this document, Sanskrit words are transliterated using the ITRANS scheme.
These functions and constants were not included directly in DateTime::Indic::Chandramana as they are more useful stand-alone. None of them are exported by default.
CONSTANTS
epoch
Fixed date of the beginning of the Kali Yuga.
anomalistic_year
Mean time from aphelion to aphelion.
anomalistic_month
Mean time from apogee to apogee with bija correction.
J0
The fixed (RD) date of Julian date 0
J1900
The Julian date at noon on Jan 1, 1900.
sidereal_year
Mean length of Hindu sidereal year.
sidereal_month
Mean time it takes for the moon to make one revolution around the earth.
synodic_month
Mean time from new moon to new moon.
creation
Fixed (RD) date of the beginning of the present yuga cycle.
FUNCTIONS
ayanamsha($jdate)
Given a Julian date $jdate
, returns the chitrapakSha ayanAMsha in decimal degrees.
lunar_longitude($jdate)
Given a Julian date $jdate
, returns the sAyana longitude of the moon at $jdate
in decimal degrees.
lunar_on_or_before ($d1, $d2)
Given two lunar dates, $d1
and $d2
, returns true if $d1
is on or before $d2
.
newmoon($jdate, $arg)
Calculates the moment of the nearest new moon at $jdate
. (the error does not exceed 2 minutes). The result is Julian date/time in UT. $arg
= 0 for the nearest previous new moon, 1 for the nearest next moon.
saura_rashi ($jdate)
returns the nirAyana rAshi of the sun at Julian date $jdate
as an integer in the range 1 .. 12.
saura_varsha ($dt)
Returns the saura varSha at datetime $dt
.
solar_longitude($jdate)
Given a Julian date $jdate
, returns the sAyana longitude of the sun at $jdate
in decimal degrees.
tithi_at_dt ($dt)
Returns the phase of the moon (tithi) at DateTime $dt
, as an integer in the range 1..30.
BUGS
Please report any bugs or feature requests through the web interface at https://github.com/jaldhar/panchanga/issues. I will be notified, and then you’ll automatically be notified of progress on your bug as I make changes. Please do not use rt.cpan.org!.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc DateTime::Indic::Utils
Support requests for this module and questions about panchanga ganita should be sent to the panchanga-devel@lists.braincells.com email list. See http://lists.braincells.com/ for more details.
Questions related to the DateTime API should be sent to the datetime@perl.org email list. See http://lists.perl.org/ for more details.
You can also look for information at:
This projects git source code repository
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
SEE ALSO
AUTHOR
Jaldhar H. Vyas, <jaldhar at braincells.com>
COPYRIGHT AND LICENSE
Copyright (C) 2009, Consolidated Braincells Inc.
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; either version 2, or (at your option) any later version, or
the Artistic License version 2.0.
The full text of the license can be found in the LICENSE file included with this distribution.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 553:
Non-ASCII character seen before =encoding in 'you’ll'. Assuming UTF-8