Dan Nagle's Technical Site

Module julian_date

Home --> Fact Sheet -->Free Source Code --> julian_date

About the Module julian_date

Go directly to Downloads

The module julian contains some routines which manipulate Julian Dates. Included are routines to convert from year, month, day to Julian Date and vice versa. Also included are day of the week calculations. Since Julian Dates follow the old astronomical convention of the day starting at noon, routines to convert from civil to astronomical convention and back are provided. There's also a calendar to solar (eighth of the day, day within the eighth of the year) formats. This module uses module standard_types, which may be obtained from the Portability Project pages.

Back to the Top

A list of (most) constants and procedures defined follows.

Library
julian() returns a double_k Julian Date, given integer year, month, and double_k day.
julian_ymd() returns an integer year, month, and double_k day, given a Julian Date.
day_of_week() returns the day of the week, given an integer year, month, and a double_k day.
julian_today() returns the double_k Julian Date of today.
julian_now() returns the double_k Julian Date of now (the fractional part of the day is the fractional part of the Julian Date.
julian_fract() returns the fractional part of the day given an integer hour, minute, second and millisecond (as from date_and_time()).
julian_hms() returns the integer hours, minutes, seconds and milliseconds, given the fraction of the day.
julian_astro_to_civil() converts from astronomical to civil convention.
julian_civil_to_astro() converts from civil to astronomical convention.
julian_solar() returns the eighth of the year amd day within the eighth of the year given the year, month, day.
julian_solar_ymd() return the year, month and day given the solar eighth of the year and day within the eighth of the year.

Back to the Top

Downloads

To download the julian_date module, click julian_date. This module depends on the standard_types module, see the portability project for information about how to make one for your compiler.

Back to the Top

To make comments or suggestions regarding standard_functions, or any of our software, please E-mail me. We're always happy to share the experiences others have using our software.


Home - Fact Sheet - Free Source Code - Fortran Links - Email me

Back to the Top