<< da2q Time series date2num >>

Grocer >> Time series > date2fq

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

[fq,namefq]=date2fq('1985q4')
// returns the frequencies of the quarterly date '1985q4'
 
[fq,namefq]=date2fq('2002a')
// returns the frequencies of the yearly date '2002a'.
 
[fq,namefq]=date2fq('97m12')
// returns the frequencies of the monthly date '97m12'.
 
[fq,namefq]=date2fq('2000/03/15')
// returns the frequencies of the daily date '2000/03/15'.

AUTHOR

Eric Dubois 2002-2007

Report an issue
<< da2q Time series date2num >>