Mango::BSON::Time - Datetime type
use Mango::BSON::Time; my $time = Mango::BSON::Time->new(time * 1000); say $time->to_epoch;
Mango::BSON::Time is a container for the BSON datetime type used by Mango::BSON.
Mango::BSON::Time inherits all methods from Mojo::Base and implements the following new ones.
my $time = Mango::BSON::Time->new; my $time = Mango::BSON::Time->new(time * 1000);
Construct a new Mango::BSON::Time object.
my $epoch = $time->to_epoch;
Convert time to floating seconds since the epoch.
my $str = $time->to_string; my $str = "$time";
Stringify time.
Mango, Mojolicious::Guides, http://mojolicio.us.
To install Mango, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mango
CPAN shell
perl -MCPAN -e shell install Mango
For more information on module installation, please visit the detailed CPAN module installation guide.