Date::H...alendar(3)

πŸ“¦
version 0.43 Β· 2 versions
, in fedora 43

πŸ’– 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. πŸ‘‘

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