[UP]


Manual Reference Pages  - 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:PD)

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 may be specified. The year defaults to the current year.

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(*,’(*(i0:,":"))’)mo2d(’March’)
    end program demo_mo2d

results:

      2016:3:1:-240:0:0:0:0

AUTHOR

John S. Urban, 2015

LICENSE

Public Domain


mo2d (3) March 11, 2021
Generated by manServer 1.08 from 891e9fc6-3f8e-46d7-a2d7-c82eb7a630e5 using man macros.