fix function for rain in period in records table