Date::Namedays::Simple - simple base class for getting namedays for a given date.
use Date::Namedays::Simple::Your_Language_Module_Here; # create an instance # Date::Namedays::Simple is abstract, so must use a subclass my $nd = new Date::Namedays::Simple::Hungarian; # get (all!) names for the year 2001, 24th of July my (@names) = $nd->getNames(7,24,2001); # Now simply print them my $namestoday = join (',',@names); print $namestoday;
In many countries, people not only celebrate their birthdays annually, but there is also the concept of "nameday". Calendars in these countries (e.g. Hungary) contain one ore more names for each day - the day on which a person with the given first name celebrate his/her nameday.
This module is here simply to aid you to get the namedays for a date. You simply supply the year, month and day, and the corresponding names are returned. It is as simple as that.
This module uses no external modules. It does not export anything - I wanted to keep it as simple as possible.
Please note: THIS MODULE IS ALPHA PHASE! It works, but I need some feedback. (Send feedback!) The methods and their parameters can change any time!
Note: names are stored in a human readable format. Because of this, they are parsed at runtime. This takes some time obviously - just don't worry about it, we "cache" that in $self, and actually that's why this module must be instanteniated, that's why we have instance methods instead of class methods.
Date::Namedays::Simple is an abstract class, it is always subclassed, for example to Date::Namedays::Simple::Hungarian. Subclasses must implement the "processNames()" method. This method shall return a string(!) in the following format:
1.1.name1,name2,...,nameN 1.2.name1,name2,...,nameN ... 12.31.name1,name2,...,nameN
Which is more precisely a "\n" separated list of the following lines:
$month.$day.$name1[,$name2,...,$nameN]\n
See Date::Namedays::Simple::Hungarian for example!
See SYNOPSIS.
None so far... send bugreports!
Ask the author. Only bugs concerning this module, please!
Csongor Fagyal csongorNOSPAMREMOVEME@fagyal.com http://www.conceptonline.com/about
This program 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 module.
perl(1).
To install Date::Namedays::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Date::Namedays::Simple
CPAN shell
perl -MCPAN -e shell install Date::Namedays::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.