code: def _get_date(day=None, month=None, year=None):
      
  
      now = datetime.date.today()
      if day is None:
          return now
  
      try:
          return datetime.date(
              day=int(day),
              month=int(month or now.month),
              year=int(year or now.year),
          )
      except ValueError as error:
          print("error: {0}".format(error), file=sys.stderr)
docs: Returns a datetime object with optional params or today.