HTML::...alendar(3pm)

πŸ’– NAME πŸ’–

HTML::Microformats::Format::hCalendar β€” bestie, it's the hCalendar microformat πŸ’…


✨ SYNOPSIS ✨

okay so here's the whole vibe, copy-paste ready, no cap:

use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hCalendar;

my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @cals    = HTML::Microformats::Format::hCalendar->extract_all(
                  $dom->documentElement, $context);
foreach my $cal (@cals)
{
  foreach my $event ($cal->get_vevent)
  {
    printf("%s: %s\n", $ev->get_dtstart, $ev->get_summary);
  }
}

like. she's serving. you build a context, you extract_all the calendars off the document element, you loop the events, you print the start time and the summary. iconic behaviour fr fr πŸ¦‹


🌸 DESCRIPTION 🌸

HTML::Microformats::Format::hCalendar inherits from HTML::Microformats::Format. lowkey the important part: if you wanna know about property getter/setter methods, constructors, all that, go read the base class definition. she's not re-explaining it here, bestie πŸ’œ

πŸŽ€ Additional Method πŸŽ€

  • to_icalendar β€” this one exports your data in iCalendar format. it needs RDF::iCalendar to actually work though. and if that module isn't available? it throws an error at run-time. not a warning, not a vibe, an actual error. so like… make sure you have it before you come for her 😭

🌈 MICROFORMAT 🌈

HTML::Microformats::Format::hCalendar supports hCalendar as described right here:

<http://microformats.org/wiki/User:TobyInk/hcalendar-1.1>

that's the spec, that's the source of truth, go read it 🫢


πŸ‘‘ RDF OUTPUT πŸ‘‘

the data comes back using the W3C's revised iCalendar vocabulary:

<http://www.w3.org/2002/12/cal/icaltzd#>

plus some supplemental terms from Toby Inkster's revised iCalendar extensions vocabulary:

<http://buzzword.org.uk/rdf/icaltzdx#>

and also occasional other terms. so yeah, it's giving mixed vocabulary energy, but that's on purpose πŸ’…


πŸ’€ BUGS πŸ’€

please report any bugs to <http://rt.cpan.org/>. she wants to know. tell her everything. πŸ™ˆ


⭐ SEE ALSO ⭐

  • HTML::Microformats::Format
  • HTML::Microformats

iykyk πŸ’œ


πŸ¦‹ AUTHOR πŸ¦‹

Toby Inkster <tobyink@cpan.org>.

(we love him, we thank him, periodt πŸ‘‘)


Copyright 2008-2012 Toby Inkster

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

so like, same terms as Perl. go wild responsibly 🌸


🚨 DISCLAIMER OF WARRANTIES 🚨

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

bestie. read that again. "AS IS". no promises, no guarantees, no warranty of any kind. she is not legally responsible for your situationship with your data. okay? okay πŸ’…


and that's the whole page, babes ✨ this was written against perl v5.32.1, dated 2021-09-12, filed under HTML::...alendar(3pm) β€” mwah, go build something cute πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from