Mohammad S Anwar > Date-Holidays-IND > Date::Holidays::IND

Download:
Date-Holidays-IND-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.04   Source  

NAME ^

Date::Holidays::IND - Interface to Indian holidays.

VERSION ^

Version 0.04

DESCRIPTION ^

India, being a culturally and religiously diverse society, celebrates various holidays and festivals. There are three national holidays in India: states and regions have local festivals depending on prevalent religious and linguistic demographics. Popular religious festivals include the Hindu festivals of Diwali, Ganesh Chaturthi, Holi, Dussehra, Islamic festivals of Eid ul-Fitr, Eid al-Adha, Mawlid an-Nabi and Christian festivals of Christmas and days of observances such as Good Friday are observed throughout the country.

Muharram, mourning for the Prophet Muhammad's grandson is observed by some sects of Islam. In addition the Sikh festivals such as Guru Nanak Jayanti, the Christian festivals as Christmas, Good Friday and Jain festivals like Mahavir Jayanti, Paryushan are celebrated in certain areas where these religions have a significant following. The annual holidays are widely observed by state and local governments; however, they may alter the dates of observance or add or subtract holidays according to local custom.

CONSTRUCTOR ^

The constructor can be created by passing the year in 4 digits form.Currently we have data for year 2011 and upto March 2012.So the constructor would only accept either 2011 / 2012 as valid years.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind_2011 = Date::Holidays::IND->new(2011);
    my $ind_2012 = Date::Holidays::IND->new(2012);

METHODS ^

get_national_holidays()

Returns National Holidays for the given year.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    my $national = $ind->get_national_holidays();
    print $ind->get($national);

get_regional_holidays()

Returns Regional Holidays for the given year.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    my $regional = $ind->get_regional_holidays();
    print $ind->get($regional);

get_state_holidays()

Returns State Holidays for the given year.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    my $state = $ind->get_state_holidays();
    print $ind->get($state);

get_holidays_table()

Returns Holidays Table for each state of India for the given year.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    print $ind->get_holidays_table();

get_state_name()

Returns State Name for the given state code.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    my $state = $ind->get_state_name('BR');
    print "State: [$state]\n";

as_string()

Returns all holidays in human readable format.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    print $ind->as_string();

    # or just simply
    print $ind;

get()

Returns given holidays in human readable format.

    use strict; use warnings;
    use Date::Holidays::IND;

    my $ind = Date::Holidays::IND->new(2011);
    my $state = $ind->get_state_holidays();
    print $ind->get($state);    

AUTHOR ^

Mohammad S Anwar, <mohammad.anwar at yahoo.com>

BUGS ^

Please report any bugs or feature requests to bug-date-holidays-ind at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Date-Holidays-IND. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT ^

You can find documentation for this module with the perldoc command.

    perldoc Date::Holidays::IND

You can also look for information at:

LICENSE AND COPYRIGHT ^

Copyright 2011 Mohammad S Anwar.

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; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

DISCLAIMER ^

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: