Example #1
0
/* performs the inverse of this function. */
double
Julian_Date(struct tm *cdate)
{
    double julian_date;

    julian_date = Julian_Date_of_Year(cdate->tm_year) +
                  DOY(cdate->tm_year,cdate->tm_mon,cdate->tm_mday) +
                  Fraction_of_Day(cdate->tm_hour,cdate->tm_min,cdate->tm_sec)
                  + 5.787037e-06; /* Round up to nearest 1 sec */

    return( julian_date );
} /*Function Julian_Date */
Example #2
0
double Julian_Date(struct tm *cdate)
{
	/* The function Julian_Date converts a standard calendar   */
	/* date and time to a Julian Date. The procedure Date_Time */
	/* performs the inverse of this function. */

	double julian_date;

	julian_date=Julian_Date_of_Year(cdate->tm_year)+DOY(cdate->tm_year,cdate->tm_mon,cdate->tm_mday)+Fraction_of_Day(cdate->tm_hour,cdate->tm_min,cdate->tm_sec)+5.787037e-06; /* Round up to nearest 1 sec */

	return julian_date;
}