Skip to content

Documentation / @interstellar-tools/temporal / marsSolDate

Function: marsSolDate() ​

ts
function marsSolDate(date: Date): number;

Defined in: mars-time.ts:54

The Mars Sol Date of a moment: a continuous count of sols, Mars's mean solar days, like the Julian date for Earth.

MSD=JDTT−2451549.51.0274912517+44796.0−0.0009626

Where:

  • JDTT is the Julian date in Terrestrial Time (days)
  • 1.0274912517 is the sol in Earth days, MARS_SOL_DAYS

Notes

  • The count starts on 29 December 1873, at about noon in Greenwich.
  • Each new sol begins at mean midnight at Airy-0, when coordinatedMarsTime wraps to 0.
  • From NASA GISS's Mars24 algorithm, refined from Allison & McEwen (2000).

Parameters ​

ParameterTypeDescription
dateDateThe moment, as a UTC Date (on or after 1972-01-01).

Returns ​

number

The Mars Sol Date in sols.

Throws ​

  • If date is not a valid Date.
  • If date is before 1972-01-01, where TT isn't defined from the leap seconds.

Example ​

ts
marsSolDate(new Date('2000-01-06T00:00:00Z')); // ≈ 44 795.99976

See ​