This is an essential bit of kit if you want your perl applications to run properly in Middle Earth.
Example usage:
- use DateTime::Fiction::JRRTolkien::Shire;
# Constructors
my $shire = DateTime::Fiction::JRRTolkien::Shire->new(year => 1419,
month => ‘Rethe’,
day => 25);
# Accessors
$year = $shire->year;
$month = $shire->month; # 1 – 12, or 0 on a holiday
$month_name = $shire->month_name;
$day = $shire->day; # 1 – 30, or 0 on a holiday
$dow = $shire->day_of_week; # 1 – 7, or 0 on certain holidays
$day_name = $shire->day_name;
$holiday = $shire->holiday;
$holiday_name = $shire->holiday_name;
$leap = $shire->is_leap_year;