GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Mango::BSON::Time(3) User Contributed Perl Documentation Mango::BSON::Time(3)

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 $num = $time->TO_JSON;

Numeric representation of time.

  my $str = $time->to_datetime;

Convert time to RFC 3339 <http://tools.ietf.org/html/rfc3339> date and time.

  my $epoch = $time->to_epoch;

Convert time to floating seconds since the epoch.

  my $str = $time->to_string;

Stringify time.

Mango::BSON::Time overloads the following operators.

  my $bool = !!$time;

Always true.

  my $str = "$time";

Alias for "to_string".

Mango, Mojolicious::Guides, <http://mojolicio.us>.
2018-03-17 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.