1XML::Feed::Util(3)    User Contributed Perl Documentation   XML::Feed::Util(3)
2
3
4

NAME

6       XML::Feed::Util - Utility functions
7

SYNOPSIS

9           use XML::Feed::Util qw(
10               format_w3cdtf
11               parse_datetime
12               parse_mail_date
13               parse_w3cdtf_date
14           );
15           use DateTime;
16
17           print format_w3cdtf(DateTime->now);
18
19           my $dt;
20           $dt = parse_datetime('January 8, 1999');
21           $dt = parse_mail_date('Fri, 23 Nov 2001 21:57:24 -0600');
22           $dt = parse_w3cdtf_date('2003-02-15T13:50:05-05:00');
23

DESCRIPTION

25       Common utility or helper functions.
26

USAGE

28   format_w3cdtf($datetime)
29       Convert DateTime object to W3CDTF format string.  Uses default timezone
30       "Z" for "floating" DateTime.
31
32   parse_datetime($date)
33       Parse any date string using DateTime::Format::ISO8601,
34       DateTime::Format::Flexible or DateTime::Format::Natural.
35
36       Returns DateTime object or undef.
37
38   parse_mail_date($date)
39       Parse date in RFC2822/822 format using DateTime::Format::Mail.
40       Fallback to "parse_datetime()" for other formats.
41
42       Returns DateTime object or undef.
43
44   parse_w3cdtf_date($date)
45       Parse date W3CDTF format using DateTime::Format::W3CDTF.  Fallback to
46       "parse_datetime()" for other formats.
47
48       Returns DateTime object or undef.
49
51       Please see the XML::Feed manpage for author, copyright, and license
52       information.
53
54
55
56perl v5.30.0                      2019-07-26                XML::Feed::Util(3)
Impressum