add judgement of the kind of ratate

add judgement of the kind of ratate.
If it is daylyRatate the date string used in oldfilename should be yesterday.
If not ,use today.