IRBEM provides a set of Fortran utility functions for date and time conversions that are used throughout the library internals and are fully callable from user code. These routines handle conversions between calendar dates, Julian Day Numbers, day-of-year values, and decimal years.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/PRBEM/IRBEM/llms.txt
Use this file to discover all available pages before exploring further.
IRBEM’s primary time inputs are year (integer), day-of-year (integer),
and UT (double, seconds since midnight). The utilities on this page help
you construct those values from other common representations such as calendar
month/day or decimal year.
JULDAY
Calculate the Julian Day Number for a given calendar month, day, and year. The Julian Day Number begins at noon of the specified calendar date.Parameters
Month number (1 = January, …, 12 = December).
Day of the month.
Four-digit year.
Output
Julian Day Number, which begins at noon of the specified calendar date.
CALDAT
Return the calendar date (month, day, year) for a given Julian Day Number. This is the inverse ofJULDAY.
Parameters
Julian Day Number to convert.
Output
Month number (1 = January, …, 12 = December).
Day of the month.
Four-digit year.
GET_DOY
Calculate the day of year for a given month, day, and year. January 1st is day 1.Parameters
Month number (1 = January, …, 12 = December).
Day of the month.
Four-digit year.
Output
Day of year (1 for January 1st).
DECY2DATE_AND_TIME
Convert a decimal year value to its full date and time components: year, month, day of month, day of year, hour, minute, second, and UT seconds. A decimal year ofyyyy.0d0 corresponds to January 1st of that year at 00:00:00 UT.
Parameters
Decimal year.
yyyy.0d0 is January 1st of year yyyy at 00:00:00 UT.Output
Four-digit year.
Month number (1 = January, …, 12 = December).
Day of the month.
Day of year (1 for January 1st).
UT hour of day (h).
UT minute (min).
UT second (sec).
UT time of day expressed in seconds since midnight.
DATE_AND_TIME2DECY
Convert a calendar date and time (year, month, day, hour, minute, second) to a decimal year. This is the inverse ofDECY2DATE_AND_TIME.
Parameters
Four-digit year.
Month number (1 = January, …, 12 = December).
Day of the month.
UT hour of day (h).
UT minute (min).
UT second (sec).
Output
Decimal year.
yyyy.0d0 is January 1st of year yyyy at 00:00:00 UT.DOY_AND_UT2DATE_AND_TIME
Calculate month, day, hour, minute, and second from year, day of year, and UT seconds. This converts the native IRBEM time triple directly into a full calendar/clock representation.Parameters
Four-digit year.
Day of year (1 for January 1st).
UT time of day in seconds since midnight.
Output
Month number (1 = January, …, 12 = December).
Day of the month.
UT hour of day (h).
UT minute (min).
UT second (sec).
Practical example: building IRBEM time inputs
Most IRBEM routines accept time as a triple of(iyear, idoy, UT). The snippet below shows how to construct that triple from a conventional calendar date using the utilities above.
Python users: the Python wrapper accepts ISO 8601 datetime strings (e.g.
"2015-02-02T06:12:43") or datetime objects directly inside the position
dictionary X. No manual date/time conversion is needed; the wrapper handles
the (iyear, idoy, UT) packing internally.