transforms a date into a number and its frequency
[num,fq]=date2num_fq(dat)
dat = a date string
indw = 'w' if the date is given as a day date but corresponds to a week (optional)
num = the numerical representation of the dates
fq = its frequency