XML::Feed::Util(3pm)
π XML::Feed::Util π
okay so bestie, quick vibe check: this is the manual page for XML::Feed::Util, and it lives in the User Contributed Perl Documentation section of your friendly neighbourhood 3pm manpages. it's a whole little toolbox of date-and-feed helpers that XML::Feed pulls in when it needs to not lose its mind over timestamps π«Ά
β¨ NAME β¨
XML::Feed::Util β Utility functions π
like. that's the whole pitch. utility functions. iconic, honestly.
πΈ SYNOPSIS πΈ
drop this at the top of your file and you're off to the races:
use XML::Feed::Util qw(
format_w3cdtf
parse_datetime
parse_mail_date
parse_w3cdtf_date
);
use DateTime;
print format_w3cdtf(DateTime->now);
my $dt;
$dt = parse_datetime('January 8, 1999');
$dt = parse_mail_date('Fri, 23 Nov 2001 21:57:24 -0600');
$dt = parse_w3cdtf_date('2003-02-15T13:50:05-05:00');
see how it's giving clean import list, sensible DateTime object, three different date formats parsed like it's nothing? yeah. that's the energy π
π¦ DESCRIPTION π¦
Common utility or helper functions. π
that's it, that's the description. no lore, no drama, just a tiny grab-bag of helpers that other stuff leans on. it's giving support-system bestie.
π USAGE π
here's the roster, one by one π
format_w3cdtf($datetime)
takes a DateTime object and turns it into a W3CDTF format string β¨
and here's the lil' detail you don't wanna sleep on: for a "floating" DateTime it uses the default timezone "Z". no cap.
parse_datetime($date)
parses literally any date string by throwing it at DateTime::Format::ISO8601, DateTime::Format::Flexible or DateTime::Format::Natural πΈ
returns a DateTime object, or undef if it can't make sense of your nonsense π
parse_mail_date($date)
parses a date in RFC2822/822 format using DateTime::Format::Mail π¬
and if that doesn't work out? it falls back to parse_datetime() for other formats. versatile queen π
returns a DateTime object, or undef.
parse_w3cdtf_date($date)
parses a date in W3CDTF format using DateTime::Format::W3CDTF π¦
same deal as above: fallback to parse_datetime() for other formats when the strict parser says no.
returns a DateTime object, or undef.
heads up bestie: every one of these three parsers can hand you backundefinstead of aDateTime. so like, actually check your return value before you go calling methods on it, okay? π
π AUTHOR & COPYRIGHT π
Please see the XML::Feed manpage for author, copyright, and license information.
(translation: the receipts live over there, go look π)
okay and that's the whole page!! slay. this little cutie is XML::Feed::Util(3pm), part of the User Contributed Perl Documentation, and it rode in with perl v5.40.1 dated 2026-02-21 β so yeah, go forth and parse those dates, main character ππβ¨
π¦ where this page comes from
- ubuntu stonking: libxml-feed-perl 1.0.0+dfsg-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms