MongoDate.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /*
  3. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  4. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  5. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  6. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  7. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  8. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  9. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  10. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  11. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  12. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  13. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. */
  15. class MongoDate {
  16. /**
  17. * @link http://php.net/manual/en/class.mongodate.php#mongodate.props.sec
  18. * @var int $sec
  19. */
  20. public $sec;
  21. /**
  22. * @link http://php.net/manual/en/class.mongodate.php#mongodate.props.usec
  23. * @var int $usec
  24. */
  25. public $usec;
  26. /**
  27. * Creates a new date. If no parameters are given, the current time is used.
  28. *
  29. * @link http://php.net/manual/en/mongodate.construct.php
  30. * @param int $sec Number of seconds since January 1st, 1970
  31. * @param int $usec Microseconds
  32. * @return MongoDate Returns this new date
  33. */
  34. public function __construct($sec = 0, $usec = 0) {}
  35. /**
  36. * Returns a DateTime object representing this date
  37. * @link http://php.net/manual/en/mongodate.todatetime.php
  38. * @return DateTime
  39. */
  40. public function toDateTime() {}
  41. /**
  42. * Returns a string representation of this date
  43. * @return string
  44. */
  45. public function __toString() {}
  46. }