Date::H...alendar(3)
π NAME π
Date::HolidayParser::iCalendar β the iCalendar-ish interface extension to Date::HolidayParser, bestie πΈ
β¨ VERSION β¨
0.4 β that's the vibe, no cap π
π¦ SYNOPSIS π¦
okay so this is an extension to Date::HolidayParser that bolts an iCalendar-like interface onto your holiday data. iconic behavior fr fr β¨
use Date::HolidayParser;
my $Holidays = Date::HolidayParser->new("$ENV{HOME}/.holiday");
...
likeβ¦ that's it. that's the whole setup π
π DESCRIPTION π
so here's the tea β β this is an extension to Date::HolidayParser that gives you an interface handing back iCalendar-compatible data instead of the normal "raw" Date::HolidayParser format. glow up π
it also makes sure that UIDs generated are always the same, so you can literally depend on them not changing between runs. no surprise UID jumps, we love stability in this house π«Ά
the iCalendar data generated right now is very simple β it does not take recurrances into account. recurring events get one event created per recurrance. that's just how it is rn π
π METHODS π
you can run any method Date::HolidayParser supports on a Date::HolidayParser::iCalendar object β (but lowkey if you're doing that you should probably just be using Date::HolidayParser instead, bestie π). the methods documented down here are all the ones you need to actually make use of Date::HolidayParser::iCalendar. periodt β¨
π $object = Date::HolidayParser::iCalendar->new(FILE)
this is the main function, the main character, the moment π it creates a new Date::HolidayParser::iCalendar object for FILE and parses the file.
FILE must be the full path to the holiday file you want to parse. full path only, no shortcuts π«
π $arrayRef = $object->list_events(YEAR,MONTH?,DAY?)
this returns an arrayRef π«Ά and which of three lists you get back depends entirely on how many parameters you feed it:
- Only year: an array containing a list of months (
1-12) that has holidays ποΈ - Year+Month: an array of days in said month that has holidays π
- All: a list of iCalendar UIDs referring to holidays on said date. these UIDs can be supplied to
get_info()to retrieve the event π
π§ $UID_Info = $object->get_info(UID)
returns an iCalendar hash reference for the supplied UID, or undef if the UID doesn't exist. (sad. but okay π)
the hash returned is structured like this:
%Hash = (
ICAL_ENTRY => "ENTRY_VALUE",
ANOTHER_ENTRY => "ANOTHER_VALUE",
);
an example might look like this:
%Hash = (
'SUMMARY' => 'Monday',
'UID' => 'D-HP-ICS-72-106-616',
'DTEND' => '20060313',
'DTSTART' => '20060313'
);
look at that structure. ate π
π«Ά AUTHOR π«Ά
Eskild Hustvedt β <zerodogg@cpan.org> πΈ
π BUGS π
please report any bugs or feature requests to bug-date-holidayparser@rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Date-HolidayParser>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. we got you, bestie π«Άβ¨
ngl reporting bugs is self-care. do it. π
β LICENSE AND COPYRIGHT β
Copyright (C) 2006, 2007, 2010 Eskild Hustvedt, all rights reserved. π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. β οΈ like zero warranty. none. don't come for me π
and that's the whole page, bestie π this came to you via perl v5.42.0, dated 2025-07-25, from the Date::H...alendar(3) manual β mwah, go slay some holidays πβ¨π
π¦ where this page comes from
- fedora 43: perl-Date-HolidayParser 0.43-15.fc43 Β· GPL-3.0-or-later AND (GPL-1.0-or-later OR Artistic-1.0-Perl)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms