From a67596512237cb490e21de9c93e3e950ffe8825b Mon Sep 17 00:00:00 2001 From: Natanael Arndt Date: Tue, 31 May 2016 17:03:16 +0200 Subject: [PATCH] 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. --- rdflib/term.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rdflib/term.py b/rdflib/term.py index 561c3e607..e2dd387d3 100644 --- a/rdflib/term.py +++ b/rdflib/term.py @@ -1440,6 +1440,8 @@ def _castPythonToLiteral(obj): 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,