BusyBird::DateTime::Format - DateTime::Format for BusyBird
use BusyBird::DateTime::Format; my $f = 'BusyBird::DateTime::Format'; ## Twitter API format my $dt1 = $f->parse_datetime('Fri Feb 08 11:02:15 +0900 2013'); ## Twitter Search API format my $dt2 = $f->parse_datetime('Sat, 16 Feb 2013 23:02:54 +0000'); my $str = $f->format_datetime($dt2); ## $str: 'Sat Feb 16 23:02:54 +0000 2013'
This class is the standard DateTime::Format in BusyBird.
It has a separate distribution from BusyBird, so that input/filter modules do not have to depend on the entire BusyBird infrastructure.
BusyBird::DateTime::Format can parse the following format.
'created_at' format of Twitter API.
'created_at' format of Twitter Search API v1.0.
It formats DateTime object in 'created_at' format of Twitter API.
Creates a formatter.
The following methods can apply both to class and to an object.
Parse $string to get DateTime object.
$string
If given an improperly formatted string, this method returns undef. It NEVER croaks.
undef
Format DateTime object to a string.
BusyBird
https://github.com/debug-ito/BusyBird-DateTime-Format
Please report bugs and feature requests to my Github issues https://github.com/debug-ito/BusyBird-DateTime-Format/issues.
Although I prefer Github, non-Github users can use CPAN RT https://rt.cpan.org/Public/Dist/Display.html?Name=BusyBird-DateTime-Format. Please send email to bug-BusyBird-DateTime-Format at rt.cpan.org to report bugs if you do not have CPAN RT account.
bug-BusyBird-DateTime-Format at rt.cpan.org
Toshio Ito, <toshioito at cpan.org>
<toshioito at cpan.org>
Copyright 2014 Toshio Ito.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install BusyBird::DateTime::Format, copy and paste the appropriate command in to your terminal.
cpanm
cpanm BusyBird::DateTime::Format
CPAN shell
perl -MCPAN -e shell install BusyBird::DateTime::Format
For more information on module installation, please visit the detailed CPAN module installation guide.