Name
date2num — transforms a date into a number
CALLING SEQUENCE
num=date2num(dat,indw)
PARAMETERS
- Input
dat = a date string
indw = 'w' if the date is given as a day date but corresponds to a week (optional)
- Output
num = the numerical representation of the dates
DESCRIPTION
Transforms a date into its numerical representation.
EXAMPLE
1) d=date2num('1985q4')
2) d=date2num('2002a')
3) d=date2num('97m12')
4) d=date2num('2002/03/15','w')
These examples return the numerical representation of an annual, a quarterly, a monthly and a weekly date.
AUTHOR
Eric Dubois 2002-2007