GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


NAME

       Mango::BSON::Time - Datetime type

SYNOPSIS

         use Mango::BSON::Time;

         my $time = Mango::BSON::Time->new(time * 1000);
         say $time->to_epoch;

DESCRIPTION

       Mango::BSON::Time is a container for the BSON datetime type used by
       Mango::BSON.

METHODS

       Mango::BSON::Time inherits all methods from Mojo::Base and implements
       the following new ones.

   new
         my $time = Mango::BSON::Time->new;
         my $time = Mango::BSON::Time->new(time * 1000);

       Construct a new Mango::BSON::Time object.

   to_epoch
         my $epoch = $time->to_epoch;

       Convert time to floating seconds since the epoch.

   to_string
         my $str = $time->to_string;
         my $str = "$time";

       Stringify time.

SEE ALSO

       Mango, Mojolicious::Guides, <http://mojolicio.us>.



  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to webmaster@gnu.wiki.
Page load time: 0.081 seconds. Last modified: November 04 2018 12:49:43.