SofaD2dtf Method

Format a 2-part Julian Date into Gregorian calendar date and time fields.

Definition

Namespace: ASCOM.Tools
Assembly: ASCOM.AstrometryTools (in ASCOM.AstrometryTools.dll) Version: 3.0.0-rc.1+86c25ce733aebb4d8b1b8a62e84770ea5e972bea
C#
public static int D2dtf(
	string scale,
	int ndp,
	double d1,
	double d2,
	ref int iy,
	ref int im,
	ref int id,
	int[] ihmsf
)

Parameters

scale  String
Time scale ID (only "UTC" is significant for leap-second handling).
ndp  Int32
Number of decimal places in the seconds field (can be negative for coarse rounding).
d1  Double
First part of the date as a 2-part Julian Date.
d2  Double
Second part of the date as a 2-part Julian Date.
iy  Int32
Returned year in the Gregorian calendar.
im  Int32
Returned month in the Gregorian calendar.
id  Int32
Returned day in the Gregorian calendar.
ihmsf  Int32
Returned time fields: hours, minutes, seconds, fraction.

Return Value

Int32
Status: +1 = dubious year, 0 = OK, -1 = unacceptable date.

Remarks

If scale is "UTC", this routine applies the SOFA quasi-JD convention that handles leap seconds.

Exceptions

ArgumentNullExceptionThrown if any array parameter is null.
ArgumentExceptionThrown if any array parameter has incorrect length.

Version Information

.NET Standard

Supported in: 2.0

See Also