code: def daterange_start(value):
      '''Parse a date range start boundary'''
      if not value:
          return None
      elif isinstance(value, datetime):
          return value.date()
      elif isinstance(value, date):
          return value
  
      result = parse_dt(value).date()
      dashes = value.count('-')
  
      if dashes >= 2:
          return result
      elif dashes == 1:
          # Year/Month only
          return result.replace(day=1)
      else:
          # Year only
          return result.replace(day=1, month=1f daterange_start(value):
      '''Parse a date range start boundary'''
      if not value:
          return None
      elif isinstance(value, datetime):
          return value.date()
      elif isinstance(value, date):
          return value
  
      result = parse_dt(value).date()
      dashes = value.count('-')
  
      if dashes >= 2:
          return result
      elif dashes == 1:
          # Year/Month only
          return result.replace(day=1)
      else:
          # Year only
          return result.replace(day=1, month=1)
docs: Parse a date range start boundary