NAME

DateTime::Format::EMIUCP::VP - Parse VP field for EMI-UCP protocol

SYNOPSIS

use DateTime::Format::EMIUCP::VP;

my $dt = DateTime::Format::EMIUCP::VP->parse_datetime('0302120655');
print $dt->ymd; # 2012-02-03
print $dt->hms; # 06:55:00

$dt->set_formatter(DateTime::Format::EMIUCP::VP->new);
print $dt; # 0302120655

DESCRIPTION

This format is a part of EMI-UCP protocol message. EMI-UCP protocol is primarily used to connect to short message service centers (SMSCs) for mobile telephones.

VP is a string of 10 numeric characters which represents validity period time in ddMMyyHHmm format.

See EMI-UCP Interface 5.2 Specification for further explanations.

METHODS

DateTime $dt = $fmt->parse_datetime(Str $scts)

Given a string in the pattern specified in the constructor, this method will return a new DateTime object.

Year number below 70 means the date before year 2000.

If given a string that doesn't match the pattern, the formatter will croak.

Str $scts = $fmt->format_datetime(DateTime $dt)

Given a DateTime object, this methods returns a string formatted in the object's format.

PREREQUISITES

SEE ALSO

DateTime::Format::EMIUCP, DateTime.

BUGS

If you find the bug or want to implement new features, please report it at http://rt.cpan.org/NoAuth/Bugs.html?Dist=DateTime-Format-EMIUCP

The code repository is available at http://github.com/dex4er/perl-DateTime-Format-EMIUCP

AUTHOR

Piotr Roszatycki <dexter@cpan.org>

LICENSE

Copyright (c) 2012 Piotr Roszatycki <dexter@cpan.org>.

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

See http://dev.perl.org/licenses/artistic.html