Home > matutils > dateconv > monthStr2num.m

monthStr2num

PURPOSE ^

dateOut=monthStr2num(dateIn)

SYNOPSIS ^

function dateOut=monthStr2num(dateIn)

DESCRIPTION ^

dateOut=monthStr2num(dateIn)

Converts output structure of tstr2date.m
to have nummeric (1:12) month field, rather
than string field.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function dateOut=monthStr2num(dateIn)
0002 
0003 %dateOut=monthStr2num(dateIn)
0004 %
0005 %Converts output structure of tstr2date.m
0006 %to have nummeric (1:12) month field, rather
0007 %than string field.
0008 
0009 month=getmonth;
0010 
0011 for i=1:12
0012   if (strcmp(dateIn.month,month{i}))
0013     dateIn.month=i;
0014   end
0015 end
0016 
0017 dateOut=dateIn;

Generated on Sun 14-Jun-2015 17:12:45 by m2html © 2005