Пример #1
0
 /**
  * @covers Marando\AstroDate\Epoch::toDate
  */
 public function testToDate()
 {
     $dt = Epoch::J2000()->toDate();
     $expected = AstroDate::jd(2451545.0, TimeScale::TT());
     $this->assertEquals($expected->toJD(), $dt->toJD());
 }
Пример #2
0
 /**
  * Converts this instance to an AstroDate instance
  * @return AstroDate
  */
 public function toDate()
 {
     if ($this->dt) {
         return $this->dt;
     } else {
         return AstroDate::jd($this->jd, TimeScale::TT());
     }
 }
Пример #3
0
 /**
  * @covers Marando\AstroDate\TimeScale::__toString
  */
 public function test__toString()
 {
     $this->assertEquals('UTC', (string) TimeScale::UTC());
 }