Celestine API Documentation - v0.2.0
    Preparing search index...

    Function calculateAge

    • Calculate age in years from birth to target date.

      Parameters

      • birthJD: number

        Julian Date of birth

      • targetJD: number

        Julian Date of target

      Returns number

      Age in years (fractional)

      const age = calculateAge(birthJD, targetJD);
      console.log(`Age: ${age.toFixed(2)} years`);