   #
 
   @doc """
-  Checks if the value is a valid time.
+  Checks if the `string` is a valid time representation.
 
   This function returns `true` if the value is a string and is formatted as
   defined by [RFC 3339](https://tools.ietf.org/html/rfc3339), `false` otherwise.
   """
-  @spec time?(any) :: boolean
+  @spec time?(String.t()) :: boolean
   def time?(string) when is_binary(string),
     do: date_time?("2000-01-01T#{string}")
 

  #

  @doc """
  Checks if the value is a valid date.

  This function returns `true` if the value is a string and is formatted as
  defined by [RFC 3339](https://tools.ietf.org/html/rfc3339), `false` otherwise.
  """
  @spec time?(any) :: boolean
  def date?(string) when is_binary(string),
    do: date_time?("#{string}T00:00:00.0Z")


  defp do_uri?(_, _), do: false

  @doc """
  Checks if the `string` is a valid URI user info.

  See also `Xema.Format.uri?/1`.
  """
  @uri_userinfo ~r/
      (?(DEFINE)
        (?<pct_encoded> %[[:xdigit:]][[:xdigit:]] )
        (?<chars>  [-._~[:alnum:]!$&'()*+,;=:] )
      )
      ^(?:(?&chars)|(?&pct_encoded))*$
    /x
  @spec uri_userinfo?(String.t()) :: boolean
  def uri_userinfo?(string) when is_binary(string),
    do: Regex.match?(@uri_userinfo, string)

  @doc """
  Checks if the `string` is a valid URI path representation.

  See also `Xema.Format.uri?/1`.
  """
  @uri_path ~r/
      (?(DEFINE)
        (?<unreserved>  [-._~[:alnum:]] )
        (?<sub_delims>  [!$&'()*+,;=] )
