예제 #1
0
 public function testConvertsBackAndForthMongoDatesWithoutLosingMillisecondPrecision()
 {
     $this->forAll(Generator\choose(0, 1500 * 1000 * 1000))->then(function ($milliseconds) {
         $moment = new Moment($milliseconds);
         $this->assertEquals($moment, MongoDate::toMoment(MongoDate::from($moment)));
     });
 }
예제 #2
0
파일: Job.php 프로젝트: onebip/recruiter
 private function scheduledAt()
 {
     if ($this->hasBeenScheduled()) {
         return T\MongoDate::toMoment($this->status['scheduled_at']);
     }
 }