Skip to content

Commit

Permalink
Add support for xsd:gYear and xsd:gYearMonth
Browse files Browse the repository at this point in the history
Update term.py to also parse values of Literals with the datatype xsd:gYear or xsd:gYearMonth.
  • Loading branch information
white-gecko committed May 31, 2016
1 parent 5ee60ff commit a675965
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rdflib/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a675965

Please sign in to comment.