જલધર હ. વ્યાસ > DateTime-Indic-0.1 > DateTime::Indic::Utils

Download:
DateTime-Indic-0.1.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.01   Source  

NAME ^

DateTime::Indic::Utils - Utility functions for Indian calendar calculation

VERSION ^

Version 0.01

SYNOPSIS ^

  my $dt = DateTime->now;
  
  my $ahargana = ahargana($dt);

  my $ayanamsha = ayanamsha($dt);

  my $moon = lunar_longitude($dt);
  
  
  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 $sun = solar_longitude($dt);

  my $rashi = saura_rashi($dt);
  
  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.

Most of the functions operate on DateTime objects which I would like to change wherever possible.

CONSTANTS ^

epoch

Fixed date of the beginning of the Kali Yuga.

anomalistic_year

Time from aphelion to aphelion.

anomalistic_month

Time from apogee to apogee, with bija correction.

J1900

The Julian date at noon on Jan 1, 1900.

sidereal_year

Mean length of Hindu sidereal year.

sidereal_month

Mean length of Hindu sidereal month.

synodic_month

Mean time from new moon to new moon.

creation

Fixed date of the beginning of the present yuga cycle.

FUNCTIONS ^

ahargana($dt)

Return the number of days that have elapsed from the beginning of the current Kali Yuga to $dt.

ayanamsha($dt)

Given a datetime object, returns the chitrapakSha ayanAMsha.

lunar_longitude($dt)

Given a DateTime object $dt, returns the sayana longitude of the moon at $dt 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.

solar_longitude($dt)

Given a DateTime object $dt, returns the sayana longitude of the sun at $dt in decimal degrees.

saura_rashi ($dt)

returns the zodiacal sign of the sun at DateTime $dt as an integer in the range 1 .. 12.

saura_varsha ($dt)

Returns the solar year at datetime $dt.

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 <http://code.google.com/p/panchanga/issues/list>. 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:

SEE ALSO ^

DateTime

AUTHOR ^

Jaldhar H. Vyas, <jaldhar at braincells.com>

COPYRIGHT AND LICENSE ^

Copyright (C) 2009, Consolidated Braincells Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

The full text of the license can be found in the LICENSE file included with this distribution.

syntax highlighting: