diff --git a/src/saml2/saml.py b/src/saml2/saml.py index 1b60822bc..205a09547 100644 --- a/src/saml2/saml.py +++ b/src/saml2/saml.py @@ -4,6 +4,7 @@ # Generated Mon May 2 14:23:33 2011 by parse_xsd.py version 0.4. # import base64 +import datetime from saml2.validate import valid_ipv4, MustValueError from saml2.validate import valid_ipv6 @@ -198,6 +199,11 @@ def _wrong_type_value(xsd, value): 'to_type': str, 'to_text': str, }, + 'date': { + 'type': datetime.date, + 'to_type': lambda x: datetime.datetime.strptime(x, '%Y-%m-%d').date(), + 'to_text': str, + }, 'integer': { 'type': int, 'to_type': int,