public static function Era00($dj1, $dj2) {
    $d1;
    $d2;
    $t;
    $f;
    $theta;

    /* Days since fundamental epoch. */
    if ($dj1 < $dj2) {
      $d1 = $dj1;
      $d2 = $dj2;
    }
    else {
      $d1 = $dj2;
      $d2 = $dj1;
    }
    $t = $d1 + ($d2 - DJ00);

    /* Fractional part of T (days). */
    $f = fmod($d1, 1.0) + fmod($d2, 1.0);

    /* Earth rotation angle at this UT1. */
    $theta = IAU::Anp(D2PI * ($f + 0.7790572732640 + 0.00273781191135448 * $t));

    return $theta;
  }