code: def paginate_activity(visible_date=None):
      
      #if visible_date:
      #    visible_date = datetime.datetime.strptime(visible_date, "%b %d ")
  
      if not visible_date:
          visible_date = datetime.date.today()
      previous_day = visible_date - datetime.timedelta(days=1)
      if visible_date == datetime.date.today():
          next_day = None
      else:
          next_day = visible_date + datetime.timedelta(days=1)
      return {'previous_day': previous_day, 'next_day': next_day}
docs: Creates "get previous day" / "get next day" pagination for activities.
  
      Visible date is the date of the activities currently being shown,
      represented by a date object.
  
      If not provided, it will default to today.
  
      #Expects date as default "Aug. 25, 2014" format.