code: def set_expire(name, date):
      '''
      Sets the date on which the account expires. The user will not be able to
      login after this date. Date format is mm/dd/yyyy
  
      :param str name: The name of the user account
  
      :param datetime date: The date the account will expire. Format must be
          mm/dd/yyyy.
  
      :return: True if successful, False if not
      :rtype: bool
  
      :raises: CommandExecutionError on user not found or any other unknown error
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' shadow.set_expire username 07/23/2015
      '''
      _set_account_policy(
          name, 'usingHardExpirationDate=1 hardExpireDateGMT={0}'.format(date))
  
      return get_expire(name) == datf set_expire(name, date):
      '''
      Sets the date on which the account expires. The user will not be able to
      login after this date. Date format is mm/dd/yyyy
  
      :param str name: The name of the user account
  
      :param datetime date: The date the account will expire. Format must be
          mm/dd/yyyy.
  
      :return: True if successful, False if not
      :rtype: bool
  
      :raises: CommandExecutionError on user not found or any other unknown error
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' shadow.set_expire username 07/23/2015
      '''
      _set_account_policy(
          name, 'usingHardExpirationDate=1 hardExpireDateGMT={0}'.format(date))
  
      return get_expire(name) == date
docs: Sets the date on which the account expires. The user will not be able to
      login after this date. Date format is mm/dd/yyyy
  
      :param str name: The name of the user account
  
      :param datetime date: The date the account will expire. Format must be
          mm/dd/yyyy.
  
      :return: True if successful, False if not
      :rtype: bool
  
      :raises: CommandExecutionError on user not found or any other unknown error
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' shadow.set_expire username 07/23/2015