1=pod
2
3=head1 NAME
4
5DateTime::Format::DateParse - Parses Date::Parse compatible formats
6
7=head1 SYNOPSIS
8
9    use DateTime::Format::DateParse;
10
11    my $dt = DateTime::Format::DateParse->parse_datetime( $date );
12    my $dt = DateTime::Format::DateParse->parse_datetime( $date, $zone );
13
14=head1 DESCRIPTION
15
16This module is a compatibility wrapper around L<Date::Parse>.
17
18=head1 USAGE
19
20=head2 Import Parameters
21
22This module accepts no arguments to it's C<import> method and exports no
23I<symbols>.
24
25=head2 Methods
26
27=head3 Class Methods
28
29=over 4
30
31=item * parse_datetime($date [, $zone])
32
33Accepts a L<Date::Parse> compatible C<$date> string and optionally a
34L<Time::Zone> compatible C<$zone> string.
35
36Returns a L<DateTime> object.
37
38=back
39
40=head1 GOTCHAS
41
42=over 4
43
44=item * If L<parse_datetime> is called on a C<$date> that doesn't know specify
45a timezone and C<$zone> is not set, then the timezone of the returned
46L<DateTime> object will be set to the C<local> timezone.  This is consistent
47with the behavior of L<Date::Parse>.
48
49=item * If L<parse_datetime> is called without a C<$zone> but the C<$date>
50string I<does> specify a timezone/offset or if L<parse_datetime> is called with
51a C<$zone> that L<DateTime::TimeZone> does not understand, the returned
52L<DateTime> object will have it's timezone set to a fixed offset from UTC.
53This means that C<DST> information is not available and date math will not
54reflect C<DST> transitions.  This may be resolved for true timezones by using
55the L<DateTime::TimeZone::Alias> module to C<alias> the L<Time::Zone> timezone
56to an Olson DB name.  This may be done automatically in a future release.
57
58=back
59
60=head1 CREDITS
61
62Graham Barr (GBARR) <gbarr@pobox.com>, author of L<Date::Parse>
63
64Everyone at the DateTime C<Asylum>.
65
66=head1 SUPPORT
67
68Support for this module is provided via the <datetime@perl.org> email list.  See
69L<http://lists.perl.org/> for more details.
70
71=head1 AUTHOR
72
73Joshua Hoblitt (JHOBLITT) <jhoblitt@cpan.org>
74
75=head1 COPYRIGHT
76
77Copyright (c) 2005-6  Joshua Hoblitt. All rights reserved. This program is free
78software; you can redistribute it and/or modify it under the same terms as Perl
79itself.
80
81The full text of the licenses can be found in the I<LICENSE> file included with
82this module, or in L<perlartistic> and L<perlgpl> as supplied with Perl 5.8.1
83and later.
84
85=head1 SEE ALSO
86
87L<Date::Parse>, L<Time::Zone>, L<DateTime>, L<DateTime::TimeZone>,
88L<DateTime::TimeZone::Alias>, L<http://datetime.perl.org/>
89
90=cut
91