C Library Functions - d2m (3)
NAME
d2m(3f) - [M_time:MODIFIED_JULIAN] given DAT date-time array returns
Modified Julian Date
(LICENSE:MIT)
CONTENTS
Synopsis
Description
Options
Returns
Example
Author
License
SYNOPSIS
function d2m(dat) result(julian)
integer,intent(in) :: dat(8)
real(kind=realtime) :: modified_julian
DESCRIPTION
Given DAT date-time array returns Modified 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
|
modified_juliandate |
| |
A Modified Julian Date (MJD) measures days
(and fractional days) since the start of 17 Nov
1858 CE in Universal Time (UTC).
|
|
EXAMPLE
Sample program:
program demo_d2m
use M_time, only : d2m, realtime
implicit none
integer :: dat(8)
call date_and_time(values=dat)
write(*,(" Today is:",*(i0:,":")))dat
write(*,*)Modified Julian Date is ,d2m(dat)
end program demo_d2m
Results:
> Today is:2025:1:26:-300:1:7:49:295
> Modified Julian Date is 60701.255431655329
AUTHOR
John S. Urban, 2025
LICENSE
MIT
| Nemo Release 3.1 | d2m (3) | June 29, 2025 |
Generated by manServer 1.08 from a549a090-3df6-42d1-bd83-c3d83cb261dd using man macros.