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

Class date

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 --+    
                                                 |    
                                object --+       |    
                                         |       |    
                             datetime.date --+   |    
                                             |   |    
                             datetime.datetime --+    
                                                 |    
                                _PyXBDateOnly_base --+
                                                     |
                                                    date

XMLSchema datatype date.

This class uses the Python datetime.datetime class as its underlying representation; fields not relevant to this type are derived from 1900-01-01T00:00:00.


Note: Unlike dateTime, timezoned date values are not converted to UTC. The provided timezone information is retained along with the instance; however, the lexical representation generated for output is canonicalized (timezones no more than 12 hours off UTC).

Nested Classes [hide private]

Inherited from _PyXBDateOnly_base (private): _XsdBaseType

Instance Methods [hide private]
 
xsdRecoverableTzinfo(self)
Return the recoverable tzinfo for the date.
source code

Inherited from _PyXBDateTime_base: __reduce__

Inherited from basis.simpleTypeDefinition: __init__, pythonLiteral, xsdConstraintsOK, xsdLiteral, xsdValueLength

Inherited from basis._TypeBinding_mixin: __setattr__, toDOM, toxml, validateBinding

Inherited from datetime.datetime: __add__, __eq__, __ge__, __getattribute__, __gt__, __hash__, __le__, __lt__, __ne__, __radd__, __repr__, __rsub__, __str__, __sub__, astimezone, combine, ctime, date, dst, fromtimestamp, isoformat, now, replace, strptime, time, timetuple, timetz, tzname, utcfromtimestamp, utcnow, utcoffset, utctimetuple

Inherited from datetime.date: __format__, fromordinal, isocalendar, isoweekday, strftime, today, toordinal, weekday

Inherited from object: __delattr__, __reduce_ex__, __sizeof__, __subclasshook__

Class Methods [hide private]
 
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._TypeBinding_mixin: Factory

Static Methods [hide private]

Inherited from _PyXBDateOnly_base: __new__

Class Variables [hide private]
  _ExpandedName = pyxb.namespace.XMLSchema.createExpandedName('d...
The expanded name of the component.
  _Lexical_fmt = '%Y-%m-%d'
Format for the lexical representation of a date-related instance, excluding timezone.
  _Fields = ('year', 'month', 'day')
  __SecondsPerMinute = 60
  __MinutesPerHalfDay = 720
  __MinutesPerDay = 1440
  _CF_enumeration = <pyxb.binding.facets.CF_enumeration object a...
  _CF_maxExclusive = <pyxb.binding.facets.CF_maxExclusive object...
  _CF_maxInclusive = <pyxb.binding.facets.CF_maxInclusive object...
  _CF_minExclusive = <pyxb.binding.facets.CF_minExclusive object...
  _CF_minInclusive = <pyxb.binding.facets.CF_minInclusive object...
  _CF_pattern = <pyxb.binding.facets.CF_pattern object at 0x2106...
  _CF_whiteSpace = <pyxb.binding.facets.CF_whiteSpace object at ...
  __SimpleTypeDefinition = <pyxb.xmlschema.structures.SimpleType...
  _httpwww_w3_org2001XMLSchema_date_FacetMap = {<class 'pyxb.bin...

Inherited from _PyXBDateOnly_base (private): _ValidFields

Inherited from basis.simpleTypeDefinition (private): _ReservedSymbols

Inherited from basis._TypeBinding_mixin: _validationConfig_

Inherited from datetime.datetime: max, min, resolution

Properties [hide private]

Inherited from basis._TypeBinding_mixin (private): _validationConfig

Inherited from datetime.datetime: hour, microsecond, minute, second, tzinfo

Inherited from datetime.date: day, month, year

Inherited from object: __class__

Method Details [hide private]

xsdRecoverableTzinfo(self)

source code 

Return the recoverable tzinfo for the date.

Return a pyxb.utils.utility.UTCOffsetTimeZone instance reflecting the timezone associated with the date, or None if the date is not timezoned.

Note: This is not the recoverable timezone, because timezones are represented as timedeltas which get normalized in ways that don't match what we expect for a tzinfo.

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]

_ExpandedName

The expanded name of the component.

Value:
pyxb.namespace.XMLSchema.createExpandedName('date')

_CF_enumeration

Value:
<pyxb.binding.facets.CF_enumeration object at 0x2106110>

_CF_maxExclusive

Value:
<pyxb.binding.facets.CF_maxExclusive object at 0x2106210>

_CF_maxInclusive

Value:
<pyxb.binding.facets.CF_maxInclusive object at 0x2106250>

_CF_minExclusive

Value:
<pyxb.binding.facets.CF_minExclusive object at 0x2106150>

_CF_minInclusive

Value:
<pyxb.binding.facets.CF_minInclusive object at 0x21061d0>

_CF_pattern

Value:
<pyxb.binding.facets.CF_pattern object at 0x21060d0>

_CF_whiteSpace

Value:
<pyxb.binding.facets.CF_whiteSpace object at 0x2106190>

__SimpleTypeDefinition

Value:
<pyxb.xmlschema.structures.SimpleTypeDefinition object at 0x1ef9710>

_httpwww_w3_org2001XMLSchema_date_FacetMap

Value:
{<class 'pyxb.binding.facets.CF_enumeration'>: <pyxb.binding.facets.CF\
_enumeration object at 0x2106110>,
 <class 'pyxb.binding.facets.CF_pattern'>: <pyxb.binding.facets.CF_pat\
tern object at 0x21060d0>,
 <class 'pyxb.binding.facets.CF_whiteSpace'>: <pyxb.binding.facets.CF_\
whiteSpace object at 0x2106190>,
 <class 'pyxb.binding.facets.CF_minInclusive'>: <pyxb.binding.facets.C\
F_minInclusive object at 0x21061d0>,
...