Name

date2fq — finds the frequency associated to a date

CALLING SEQUENCE

[fq,namefq]=date2fq(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

• fq = an integer (the frequency of the date)

• namefq = a string (the string characteristic of the date)

DESCRIPTION

Finds the frequency associated to a date.

EXAMPLE

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

               

AUTHOR

Eric Dubois 2002-2007