NAME

DateTimeX::Format::POSIX::Strptime - OO interface into the POSIX library's strptime

SYNOPSIS

use DateTimeX::Format::Strptime;

my $dtf = DateTimeX::Format::Strptime({ locale => 'en_US', timezone => 'America/Chicago', pattern => $pattern });

$dtf->parse_datetime( "time" );

$dtf->pattern( $newPattern );

## Call-only pattern won't be cached
$dtf->parse_datetime( "time", { pattern => $pattern } );

$dtf->format_datetime( $dt, $pattern );

DESCRIPTION

This module does *not* reimpliment strptime(3) into perl. It binds into the POSIX library using POSIX::strptime and uses Moose for the rest. This is massively simplier and less error-prone than DateTime::Format::Strptime which is an attempt at a total perl implimentation of POSIX strptime(3).

This module differs from DateTime::Format::Strptime in a few ways: (a) it deosn't have complex PrintError/RaiseError code, it simply dies if it has reason to believe there was an error; (b) it doesn't have complex diagnostic code, and it doesn't really need it either: the work is in the POSIX library not perl; (c) it has all of the advantages of the DateTimeX::Format, and DateTimeX::Format::CustomPattern roles.

CONSTRUCTOR AND METHODS

See the two accompanying roles DateTimeX::Format, and DateTimeX::Format::CustomPattern which provide the constructor, and details about the how the methods parse_datetime and format_datetime work.

AUTHOR

Evan Carroll, <me at evancarroll.com>

BUGS

Please report any bugs or feature requests to bug-datetimex-format-posix-strptime at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DateTimeX-Format-POSIX-Strptime. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc DateTimeX::Format::POSIX::Strptime

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009 Evan Carroll, all rights reserved.

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