refractoring of checkTime & addition of checkMonth