Date::Holidays::IND - Interface to Indian holidays.
Version 0.01
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 such 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.
The constructor can be created by passing the year in 4 digits form. Currently we have data for year 2011 and 2012. So the constructor would only accept either 2011 or 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);
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);
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);
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);
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();
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";
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;
Returns given holidays in human readable format.
Mohammad S Anwar, <mohammad.anwar at yahoo.com>
<mohammad.anwar at yahoo.com>
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.
bug-date-holidays-ind at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Date::Holidays::IND
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Date-Holidays-IND
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Date-Holidays-IND
CPAN Ratings
http://cpanratings.perl.org/d/Date-Holidays-IND
Search CPAN
http://search.cpan.org/dist/Date-Holidays-IND/
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.
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.
To install Date::Holidays::IND, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Date::Holidays::IND
CPAN shell
perl -MCPAN -e shell install Date::Holidays::IND
For more information on module installation, please visit the detailed CPAN module installation guide.