Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'name': XSD_DATETIME,
'python_type': (unicode_type, str, datatypes.DateTime),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.DateTime.fromstring,
}, # [-][Y*]YYYY-MM-DD[Thh:mm:ss]
{
'name': XSD_DATE,
'python_type': (unicode_type, str, datatypes.Date),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.Date.fromstring,
}, # [-][Y*]YYYY-MM-DD
{
'name': XSD_GYEAR,
'python_type': (unicode_type, str, datatypes.GregorianYear),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.GregorianYear.fromstring,
}, # [-][Y*]YYYY
{
'name': XSD_GYEAR_MONTH,
'python_type': (unicode_type, str, datatypes.GregorianYearMonth),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.GregorianYearMonth.fromstring,
}, # [-][Y*]YYYY-MM
# --- Datetime derived types (XSD 1.1) ---
{
'name': XSD_DATE_TIME_STAMP,
'python_type': (unicode_type, str),
'base_type': XSD_DATETIME,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.DateTime.fromstring,
}, # [-][Y*]YYYY-MM-DD[Thh:mm:ss]
{
'name': XSD_DATE,
'python_type': (unicode_type, str, datatypes.Date),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.Date.fromstring,
}, # [-][Y*]YYYY-MM-DD
{
'name': XSD_GYEAR,
'python_type': (unicode_type, str, datatypes.GregorianYear),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.GregorianYear.fromstring,
}, # [-][Y*]YYYY
{
'name': XSD_GYEAR_MONTH,
'python_type': (unicode_type, str, datatypes.GregorianYearMonth),
'admitted_facets': DATETIME_FACETS,
'facets': [COLLAPSE_WHITE_SPACE_ELEMENT],
'to_python': datatypes.GregorianYearMonth.fromstring,
}, # [-][Y*]YYYY-MM
# --- Datetime derived types (XSD 1.1) ---
{
'name': XSD_DATE_TIME_STAMP,
'python_type': (unicode_type, str),
'base_type': XSD_DATETIME,
'to_python': datatypes.DateTime.fromstring,
'facets': [etree_element(XSD_EXPLICIT_TIMEZONE, value='required')],
}, # [-][Y*]YYYY-MM-DD[Thh:mm:ss] with required timezone