1NAME 2 DateTime::Format::W3CDTF - Parse and format W3CDTF datetime strings 3 4SYNOPSIS 5 use DateTime::Format::W3CDTF; 6 7 my $w3c = DateTime::Format::W3CDTF->new; 8 my $dt = $w3c->parse_datetime( '2003-02-15T13:50:05-05:00' ); 9 10 # 2003-02-15T13:50:05-05:00 11 $w3c->format_datetime($dt); 12 13DESCRIPTION 14 This module understands the W3CDTF date/time format, an ISO 8601 15 profile, defined at http://www.w3.org/TR/NOTE-datetime. This format as 16 the native date format of RSS 1.0. 17 18 It can be used to parse these formats in order to create the appropriate 19 objects. 20 21METHODS 22 This API is currently experimental and may change in the future. 23 24 * parse_datetime($string) 25 26 Given a W3CDTF datetime string, this method will return a new 27 "DateTime" object. 28 29 If given an improperly formatted string, this method may die. 30 31 * format_datetime($datetime) 32 33 Given a "DateTime" object, this methods returns a W3CDTF datetime 34 string. 35 36 NOTE: As of version 0.4, format_datetime no longer attempts to 37 truncate datetimes without a time component. This is due to the fact 38 that "DateTime" doesn't distinguish between a date with no time 39 component, and midnight. 40 41 * format_date($datetime) 42 43 Given a "DateTime" object, return a W3CDTF datetime string without 44 the time component. 45 46SUPPORT 47 Support for this module is provided via the datetime@perl.org email 48 list. See http://datetime.perl.org/?MailingList for details. 49 50 Please submit bugs to the CPAN RT system at 51 http://rt.cpan.org/NoAuth/ReportBug.html?Queue=datetime-format-w3cdtf or 52 via email at bug-datetime-format-w3cdtf@rt.cpan.org. 53 54AUTHOR 55 Dave Rolsky <autarch@urth.org> 56 57CREDITS 58 This module is maintained by Gregory Todd Williams <gwilliams@cpan.org>. 59 It was originally created by Kellan Elliott-McCrea <kellan@protest.net>. 60 61 This module was inspired by DateTime::Format::ICal 62 63COPYRIGHT 64 Copyright (c) 2009 David Rolsky. All rights reserved. This program is 65 free software; you can redistribute it and/or modify it under the same 66 terms as Perl itself. 67 68 Copyright (c) 2003 Kellan Elliott-McCrea 69 70 Portions of the code in this distribution are derived from other works. 71 Please see the CREDITS file for more details. 72 73 The full text of the license can be found in the LICENSE file included 74 with this module. 75 76SEE ALSO 77 datetime@perl.org mailing list 78 79 http://datetime.perl.org/ 80 81