DateTime::Format::StrptimeDateTime::Format::Strptime is a Perl module to parse and format strp and strf time patterns. | |
Download |
DateTime::Format::Strptime Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Rick Measham
- Publisher web site:
- http://search.cpan.org/~rickm/
DateTime::Format::Strptime Tags
DateTime::Format::Strptime Description
DateTime::Format::Strptime is a Perl module to parse and format strp and strf time patterns. DateTime::Format::Strptime is a Perl module to parse and format strp and strf time patterns.SYNOPSIS use DateTime::Format::Strptime; my $Strp = new DateTime::Format::Strptime( pattern => '%T', locale => 'en_AU', time_zone => 'Australia/Melbourne', ); my $dt = $Strp->parse_datetime('23:16:42'); $Strp->format_datetime($dt); # 23:16:42 # Croak when things go wrong: my $Strp = new DateTime::Format::Strptime( pattern => '%T', locale => 'en_AU', time_zone => 'Australia/Melbourne', on_error => 'croak', ); $newpattern = $Strp->pattern('%Q'); # Unidentified token in pattern: %Q in %Q at line 34 of script.pl # Do something else when things go wrong: my $Strp = new DateTime::Format::Strptime( pattern => '%T', locale => 'en_AU', time_zone => 'Australia/Melbourne', on_error => &phone_police, );This module implements most of strptime(3), the POSIX function that is the reverse of strftime(3), for DateTime. While strftime takes a DateTime and a pattern and returns a string, strptime takes a string and a pattern and returns the DateTime object associated. Requirements: · Perl
DateTime::Format::Strptime Related Software