downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

MongoDate::__toString> <MongoDate
[edit] Last updated: Fri, 18 Sep 2009

view this page in

MongoDate::__construct

(PECL mongo >= 0.8.1)

MongoDate::__constructCreates a new date.

Описание

MongoDate::__construct ([ long $sec [, long $usec ]] )

Creates a new date. If no parameters are given, the current time is used.

Параметри

sec

Number of seconds since January 1st, 1970.

usec

Microseconds.

Връщани стойности

Returns this new date.

Примери

Example #1 MongoDate::__construct() example

This example demonstrates creating a new date with the current time and a new date with a given time.

<?php

$d 
= new MongoDate();
echo 
"$d\n";
$d = new MongoDate(1234567890);
echo 
"$d\n";

?>

Примерът по-горе ще изведе нещо подобно на:

0.23660600 1235685067
0.00000000 1234567890

Вж. също



add a note add a note User Contributed Notes MongoDate::__construct
There are no user contributed notes for this page.

 
show source | credits | stats | sitemap | contact | advertising | mirror sites