code: def get_next_valid_day(self, timestamp):
          
          if self.get_next_future_timerange_valid(timestamp) is None:
              # this day is finish, we check for next period
              (start_time, _) = self.get_start_and_end_time(get_day(timestamp) + 86400)
          else:
              (start_time, _) = self.get_start_and_end_time(timestamp)
  
          if timestamp <= start_time:
              return get_day(start_time)
  
          if self.is_time_day_valid(timestamp):
              return get_day(timestamp)
  
          return None
docs: Get next valid day for timerange
  
          :param timestamp: time we compute from
          :type timestamp: int
          :return: timestamp of the next valid day (midnight) in LOCAL time.
          :rtype: int | None