gis-tools-ts - v0.6.0
    Preparing search index...

    Function invjday

    • procedure invjday

      this procedure finds the year, month, day, hour, minute and second given the julian date. tu can be ut1, tdt, tdb, etc.

      algorithm : set up starting values find leap year - use 1900 because 2000 is a leap year find the elapsed days through the year in a loop call routine to find each individual value

      author : david vallado 719-573-2600 1 mar 2001

      inputs description range / units jd - julian date days from 4713 bc

      outputs : year - year 1900 .. 2100 mon - month 1 .. 12 day - day 1 .. 28,29,30,31 hr - hour 0 .. 23 min - minute 0 .. 59 sec - second 0.0 .. 59.999

      locals : days - day of year plus fractional portion of a day days tu - julian centuries from 0 h jan 0, 1900 temp - temporary double values leapyrs - number of leap years from 1900

      coupling : days2mdhms - finds month, day, hour, minute and second given days and year

      references : vallado 2007, 208, alg 22, ex 3-13

      Parameters

      • jd: number

        julian date

      • asArray: boolean

        if true, return an array, otherwise return a Date

      Returns [number, number, number, number, number, number] | Date

      • Date or [year, month, day, hour, minute, seconds]