Package pyxb :: Package binding :: Module datatypes :: Class _PyXBDateTime_base |
[hide private]
[frames] | no frames]

# type _PyXBDateTime_base

source code

                        object --+
                                 |
                           cscRoot --+
                                     |
         utils.utility.Locatable_mixin --+
                                         |
                  basis._TypeBinding_mixin --+
                                             |
                                object --+   |
                                         |   |
    utils.utility._DeconflictSymbols_mixin --+
                                             |
                            object --+       |
                                     |       |
                               cscRoot --+   |
                                         |   |
                basis._DynamicCreate_mixin --+
                                             |
                    basis.simpleTypeDefinition --+
                                                 |
                                                _PyXBDateTime_base

Known Subclasses:
  - _PyXBDateOnly_base
  - , dateTime
  - , time

Instance Methods | [hide private]
__reduce__(self) | source code
Inherited from `basis.simpleTypeDefinition`: `__init__`, `pythonLiteral`, `xsdConstraintsOK`, `xsdLiteral`, `xsdValueLength` Inherited from `basis.simpleTypeDefinition` (private): `_checkValidValue`, `_isValidValue`, `_setAttribute`, `_toDOM_csc`, `_validateBinding_vx` Inherited from `basis._TypeBinding_mixin`: `__setattr__`, `toDOM`, `toxml`, `validateBinding` Inherited from `basis._TypeBinding_mixin` (private): `_TypeBinding_mixin__checkNilCtor`, `_TypeBinding_mixin__getValidationConfig`, `_constructedWithValue`, `_diagnosticName`, `_element`, `_finalizeContentModel`, `_isNil`, `_namespaceContext`, `_performValidation`, `_postDOMValidate`, `_postFactory_vx`, `_resetContent`, `_setAttributesFromKeywordsAndDOM`, `_setElement`, `_setIsNil`, `_setNamespaceContext`, `_setValidationConfig`, `_substitutesFor` Inherited from `utils.utility.Locatable_mixin` (private): `_location`, `_setLocation`

Class Methods | [hide private]
_LexicalToKeywords(cls, text) | source code
_SetKeysFromPython_csc(cls, python_value, kw, fields) | source code
_SetKeysFromPython(cls, python_value, kw, fields) | source code
_AdjustForTimezone(cls, kw) Update datetime keywords to account for timezone effects. | source code
XsdLiteral(cls, value) Convert from a python value to a string usable in an XML document. | source code
Inherited from `basis.simpleTypeDefinition`: `PythonLiteral`, `SimpleTypeDefinition`, `XsdConstraintsOK`, `XsdSuperType`, `XsdValueLength` Inherited from `basis.simpleTypeDefinition` (private): `_CheckValidValue`, `_ConvertArguments`, `_ConvertArguments_vx`, `_FacetMap`, `_InitializeFacetMap`, `_IsSimpleTypeContent`, `_IsValidValue`, `_SimpleTypeDefinition`, `_XsdConstraintsPreCheck_vb`, `_description` Inherited from `basis._TypeBinding_mixin`: `Factory` Inherited from `basis._TypeBinding_mixin` (private): `_CompatibleValue`, `_GetValidationConfig`, `_IsUrType`, `_Name`, `_PerformValidation`, `_PreFactory_vx`, `_RequireXSIType`, `_SetValidationConfig`, `_TypeBinding_mixin__AttributesFromDOM` Inherited from `basis._DynamicCreate_mixin` (private): `_AlternativeConstructor`, `_DynamicCreate`, `_DynamicCreate_mixin__AlternativeConstructorAttribute`, `_DynamicCreate_mixin__SupersedingClassAttribute`, `_SetAlternativeConstructor`, `_SetSupersedingClass`, `_SupersedingClass`

Static Methods | [hide private]
Inherited from `basis.simpleTypeDefinition`: `__new__`

Class Variables | [hide private]
| _Lexical_fmt = `None` Format for the lexical representation of a date-related instance, excluding timezone.
| __PatternMap = `{'%Y': '(?P<negYear>-?)(?P<year>\d{4,})', '%m':`...``
| __LexicalREMap = `{}`
| __LexicalIntegerFields = `'year', 'month', 'day', 'hour', 'minu`...``
| _UTCTimeZone = `pyxb.utils.utility.UTCOffsetTimeZone(0)` A `datetime.tzinfo` instance representing UTC.
| _LocalTimeZone = `pyxb.utils.utility.LocalTimeZone()` A `datetime.tzinfo` instance representing the local time zone.
| _DefaultYear = `1900`
| _DefaultMonth = `1`
| _DefaultDay = `1`
| _PyXBDateTime_base__LexicalIntegerFields = ``(``'``year``'``,` `'``month``'``,` `'``...``
| _PyXBDateTime_base__LexicalREMap = ``{``}``
| _PyXBDateTime_base__PatternMap = ``{``'``%H``'``:` `'``(?P<hour>\\d{2})``'``,` `'``%``...``
Inherited from `basis.simpleTypeDefinition` (private): `_ReservedSymbols` Inherited from `basis._TypeBinding_mixin`: `_validationConfig_` Inherited from `basis._TypeBinding_mixin` (private): `_Abstract`, `_AttributeMap`, `_AttributeWildcard`, `_ExpandedName`, `_PyXBFactoryKeywords`, `_TypeBinding_mixin__WarnedUnassociatedElement`, `_TypeBinding_mixin__constructedWithValue`, `_TypeBinding_mixin__element`, `_TypeBinding_mixin__namespaceContext`, `_TypeBinding_mixin__xsiNil`, `_XSDLocation`

Properties | [hide private]
Inherited from `basis._TypeBinding_mixin` (private): `_validationConfig`

Method Details | [hide private]

### __reduce__(self) | source code
Overrides: object.__reduce__ (inherited documentation)

### _AdjustForTimezone(cls, kw) Class Method | source code
Update datetime keywords to account for timezone effects. All XML schema timezoned times are in UTC, with the time "in its timezone". If the keywords indicate a non-UTC timezone is in force, and pyxb.PreserveInputTimeZone() has not been set, adjust the values to account for the zone by subtracting the corresponding UTC offset and mark explicitly that the time is in UTC by leaving a `tzinfo` attribute identifying the UTC time zone. Parameters: `kw` - A dictionary of keywords relevant for a date or time instance. The dictionary is updated by this call.

### XsdLiteral(cls, value) Class Method | source code
Convert from a python value to a string usable in an XML document. This should be implemented in the subclass. Overrides: basis.simpleTypeDefinition.XsdLiteral (inherited documentation)

Class Variable Details | [hide private]

  ### _Lexical_fmt Format for the lexical representation of a date-related instance, excluding timezone. Subclasses must define this. Value:
      None

  ### __PatternMap Value:
      {'%Y': '(?P<negYear>-?)(?P<year>\d{4,})', '%m': '(?P<month>\d{2})', '%
      d': '(?P<day>\d{2})', '%H': '(?P<hour>\d{2})', '%M': '(?P<minute>\d{2}
      )', '%S': '(?P<second>\d{2})(?P<fracsec>\.\d+)?', '%Z': '(?P<tzinfo>Z|
      [-+]\d\d:\d\d)'}

  ### __LexicalIntegerFields Value:
      'year', 'month', 'day', 'hour', 'minute', 'second'

  ### _PyXBDateTime_base__LexicalIntegerFields Value:
      ('year', 'month', 'day', 'hour', 'minute', 'second')

  ### _PyXBDateTime_base__PatternMap Value:
      {'%H': '(?P<hour>\\d{2})',
       '%M': '(?P<minute>\\d{2})',
       '%S': '(?P<second>\\d{2})(?P<fracsec>\\.\\d+)?',
       '%Y': '(?P<negYear>-?)(?P<year>\\d{4,})',
       '%Z': '(?P<tzinfo>Z|[-+]\\d\\d:\\d\\d)',
       '%d': '(?P<day>\\d{2})',
       '%m': '(?P<month>\\d{2})'}