Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Date::Indian module

by irah (Pilgrim)
on Jun 11, 2009 at 09:43 UTC ( #770576=perlquestion: print w/ replies, xml ) Need Help??
irah has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

my $date = Date::Indian->new( ymd => '2009:6:11', tz => '5:30', locn => '78:18 17:12' );

I am calling new function in Date::Indian module. As of my knowledge, I understand from the variable name, the third argument of the function mentioning location. Please correct me, if my understand is wrong.

Also explain me, How the value is given for this argument?. For example, the value for tz is based on timezone. Similarly how it is given for this variable?.

Comment on Date::Indian module
Download Code
Re: Date::Indian module
by Anonymous Monk on Jun 11, 2009 at 11:30 UTC

    Read document of this module in CPAN

      The snippet the OP posted is from the synopsis in the docs. That is the only reference to locn which is probably why the question is being asked.
Re: Date::Indian module
by afoken (Parson) on Jun 11, 2009 at 11:40 UTC

    I was tempted to write "RTFM", but in this case, the FM is not very fine. I guess that locn is latitude and longitude, as stated in a comment in the source:

    locn  => undef,   # ex: locn  =>'82:30E 17:25N'

    Reading the source is somewhat frightening. It contains at three undocumented packages without a reasonable prefix (Sun, Moon, Util), and its full of magic numbers without any explaining comment. There are lots of debugging artefacts. It completely lacks any sanity checks, and at least the example in the comment cited above is wrong. Looking at the code of sub _dolocn, the locn should not contain letters.

    You should better treat Date::Indian as pre-alpha code, i.e. avoid it for production use.

    You could try to contact the author, but I would not hope for an answer. His last upload is dated "27 Aug 2003".

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: Date::Indian module
by syphilis (Canon) on Jun 11, 2009 at 12:07 UTC
Re: Date::Indian module
by jaldhar (Vicar) on Jun 11, 2009 at 17:43 UTC

    This module is a huge mess. How bad is it? Even the name is wrong. It doesn't deal with "Indian dates" but a particular kind of luni-solar calendar which only one of the several traditionally used in India. And even then it only gives you the basic numbers you need to actually calculate the date. One of these days I will actually release DateTime::Calendar::Indic to CPAN and working with various traditional Indian calendars will be much easier. In the meantime, if you really want to use this module, you call the constructor like this:

    my $date = Date::Indian->new( ymd => "YYYY-MM-DD", # month = 1-12 tz => 'HH:MM', # time offset from +Greenwich. Negative if West of Greenwich locn => 'HH:MMD HH:MMD', # longitude and latitude, D = + E or W for longitude and N or S for latitude );

    --
    જલધર

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://770576]
Approved by targetsmart
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2014-09-01 19:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (17 votes), past polls