finds the frequency associated to a date
[fq,namefq]=date2fq(dat,indw)
* dat = a date string
* indw = 'w' if the date is given as a day date but corresponds to a week (optional)
* fq = an integer (the frequency of the date)
* namefq = a string (the string characteristic of the date)