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 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

    MIT


Nemo Release 3.1 mo2d (3) July 22, 2023
Generated by manServer 1.08 from f801a98b-be53-4c44-95d6-3fe22ddfa9af using man macros.