C Library Functions - d2j (3)
NAME
d2j(3f) - [M_time:JULIAN] given DAT date-time array returns Julian Date
(LICENSE:MIT)
CONTENTS
Synopsis
Description
Options
Returns
Example
Author
License
SYNOPSIS
function d2j(dat) result(julian)
integer,intent(in) :: dat(8)
real(kind=realtime) :: julian
DESCRIPTION
Given DAT date-time array returns Julian Date
OPTIONS
|
dat |
Integer array holding a "DAT" array, similar in structure
to the array returned by the intrinsic DATE_AND_TIME(3f):
|
|
dat=[ year,month,day,timezone,hour,&
& minutes,seconds,milliseconds]
If not present, use current time.
RETURNS
|
julian |
The Julian Date. Julian dates (abbreviated JD)
are simply a continuous count of days and fractions since
noon Universal Time on January 1, 4713 BC (on the Julian
calendar).
|
|
EXAMPLE
Sample program:
program demo_d2j
use M_time, only : d2j
implicit none
integer :: dat(8)
call date_and_time(values=dat)
write(*,(" Today is:",*(i0:,":")))dat
write(*,*)Julian Date is ,d2j(dat)
end program demo_d2j
results:
Today is:2016:7:19:-240:2:11:50:885
Julian Date is 2457588.7582278359
AUTHOR
John S. Urban, 2015
LICENSE
MIT
| Nemo Release 3.1 | d2j (3) | June 29, 2025 |
Generated by manServer 1.08 from 004b0ab5-e08a-4219-8633-83ca81d03806 using man macros.