C Library Functions - mo2d (3)
NAME
mo2d(3f) - [M_time:MONTH_NAME] given month name return DAT date-time
array for beginning of that month in specified year
(LICENSE:MIT)
CONTENTS
Synopsis
Description
Options
Returns
Example
Author
License
SYNOPSIS
function mo2d(month_name,year) result(dat)
character(len=*),intent(in) :: month_name
integer,intent(in),optional :: year
integer :: dat(8)
DESCRIPTION
Given a Common Calendar month name, return the date as a "DAT" array
for the 1st day of the month. An optional year that defaults to the
current year may be specified.
OPTIONS
|
month_name |
| |
A string representing a Common Calendar month name.
|
|
year |
Optional year. Defaults to current year
|
|
RETURNS
|
dat |
An integer array that has the same structure as the array
returned by the Fortran intrinsic DATE_AND_TIME(3f):
|
|
dat=[ year,month,day,timezone,hour,&
& minutes,seconds,milliseconds]
EXAMPLE
Sample program:
program demo_mo2d
use M_time, only : mo2d
implicit none
write(*,("MARCH:",*(i0:,":")))mo2d(March)
end program demo_mo2d
Results:
> MARCH:2016:3:1:-240:0:0:0:0
AUTHOR
John S. Urban, 2015
LICENSE
MIT
| Nemo Release 3.1 | mo2d (3) | June 29, 2025 |
Generated by manServer 1.08 from 47c25501-7b5e-4d57-819a-3221ec8217be using man macros.