Name

date2num_fq — transforms a date into a number and its frequency

CALLING SEQUENCE

[num,fq]=date2num_fq(dat)

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

• fq = its frequency

DESCRIPTION

Transforms a date into its numerical representation and its frequency.

EXAMPLE

1) [num,fq]=date2num_fq('1985q4')
2) [num,fq]= date2num_fq ('2002a')
3) [num,fq]= date2num_fq ('97m12')
4) [num,fq]= date2num_fq ('2002/03/15','w')
 
These examples return the frequencies of annual, quarterly, monthly and weekly dates. 

               

AUTHOR

Eric Dubois 2002-2007