Coding sensors for daily, weekly, monthly and annual max values

I currently use statistics sensors to record 24 hour, 7 day, 31 day and 365 day high recordings of wind speed, and am looking for a way to reset them at the beginning of the day, week, month and year.

Any ideas?