Caelus3,462 checksGitHubv0.25.0MIT
API Reference / calendarDate · function

Function: calendarDate()

function calendarDate(jd, calendar?): CalendarDate;

Convert a Julian Day to a calendar date, the inverse of julianDay (Meeus, Astronomical Algorithms, ch. 7).

Parameters

ParameterTypeDefault valueDescription
jdnumberundefinedJulian Day.
calendarCalendar"gregorian"The calendar to express the date in. Defaults to "gregorian".

Returns

CalendarDate

Year, month, day, and the time of day in hours.

Example

calendarDate(2451545.0);            // { year: 2000, month: 1, day: 1, hour: 12 }
calendarDate(1748839.75, "julian"); // { year: 76, month: 1, day: 24, hour: 6 }

Start building

Quickstart →