Add is_xsd_date/1 and is_xsd_time/1 guards
This commit is contained in:
parent
45866fe30b
commit
60281a0379
1 changed files with 13 additions and 1 deletions
|
@ -27,8 +27,10 @@ defmodule RDF.Literal.Guards do
|
|||
@xsd_string XSD.string()
|
||||
@xsd_boolean XSD.boolean()
|
||||
@xsd_dateTime XSD.dateTime()
|
||||
@xsd_date XSD.date()
|
||||
@xsd_time XSD.time()
|
||||
@xsd_any_uri XSD.anyURI()
|
||||
@rdf_lang_string RDF.langString
|
||||
@rdf_lang_string RDF.langString()
|
||||
|
||||
@doc """
|
||||
Returns `true` if the given datatype is `xsd:integer`; otherwise returns `false`.
|
||||
|
@ -64,6 +66,16 @@ defmodule RDF.Literal.Guards do
|
|||
"""
|
||||
defguard is_xsd_datetime(datatype) when datatype == @xsd_dateTime
|
||||
|
||||
@doc """
|
||||
Returns `true` if the given datatype is `xsd:date`; otherwise returns `false`.
|
||||
"""
|
||||
defguard is_xsd_date(datatype) when datatype == @xsd_date
|
||||
|
||||
@doc """
|
||||
Returns `true` if the given datatype is `xsd:time`; otherwise returns `false`.
|
||||
"""
|
||||
defguard is_xsd_time(datatype) when datatype == @xsd_time
|
||||
|
||||
@doc """
|
||||
Returns `true` if the given datatype is `xsd:anyURI`; otherwise returns `false`.
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue