summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Arndt <arndtn@gmail.com>2016-05-31 17:03:16 +0200
committerNatanael Arndt <arndtn@gmail.com>2016-05-31 17:03:16 +0200
commita67596512237cb490e21de9c93e3e950ffe8825b (patch)
treed91333010ddfeb75c252249f5ce141b23748f514
parent5ee60ff3cb55d92e93729b01c2268282562af13d (diff)
downloadrdflib-a67596512237cb490e21de9c93e3e950ffe8825b.tar.gz
Add support for xsd:gYear and xsd:gYearMonth
Update term.py to also parse values of Literals with the datatype xsd:gYear or xsd:gYearMonth.
-rw-r--r--rdflib/term.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/rdflib/term.py b/rdflib/term.py
index 561c3e60..e2dd387d 100644
--- a/rdflib/term.py
+++ b/rdflib/term.py
@@ -1440,6 +1440,8 @@ XSDToPython = {
None : None, # plain literals map directly to value space
URIRef(_XSD_PFX + 'time'): parse_time,
URIRef(_XSD_PFX + 'date'): parse_date,
+ URIRef(_XSD_PFX + 'gYear'): parse_date,
+ URIRef(_XSD_PFX + 'gYearMonth'): parse_date,
URIRef(_XSD_PFX + 'dateTime'): parse_datetime,
URIRef(_XSD_PFX + 'string'): None,
URIRef(_XSD_PFX + 'normalizedString'): None,