<s> """<STR_LIT>""" <EOL> """<STR_LIT>""" <EOL> __version__ = "<STR_LIT>" [ <NUM_LIT:11> : - <NUM_LIT:2> ] <EOL> __date__ = "<STR_LIT>" [ <NUM_LIT:7> : - <NUM_LIT:2> ] <EOL> import datetime <EOL> import time <EOL> def unzfill ( str ) : <EOL> """<STR_LIT>""" <EOL> try : <EOL> return str [ : str . index ( b'<STR_LIT>' ) ] <EOL> except ValueError : <EOL> return str <EOL> def getDate ( date = None ) : <EOL> """<STR_LIT>""" <EOL> if date is None : <EOL> return datetime . date . today ( ) <EOL> if isinstance ( date , datetime . date ) : <EOL> return date <EOL> if isinstance ( date , datetime . datetime ) : <EOL> return date . date ( ) <EOL> if isinstance ( date , ( int , float ) ) : <EOL> return datetime . date . fromtimestamp ( date ) <EOL> if isinstance ( date , str ) : <EOL> date = date . replace ( "<STR_LIT:U+0020>" , "<STR_LIT:0>" ) <EOL> if len ( date ) == <NUM_LIT:6> : <EOL> return datetime . date ( * time . strptime ( date , "<STR_LIT>" ) [ : <NUM_LIT:3> ] ) <EOL> return datetime . date ( * time . strptime ( date , "<STR_LIT>" ) [ : <NUM_LIT:3> ] ) <EOL> if hasattr ( date , "<STR_LIT>" ) : <EOL> return datetime . date ( * date [ : <NUM_LIT:3> ] ) <EOL> return datetime . date . fromtimestamp ( date . ticks ( ) ) <EOL> def getDateTime ( value = None ) : <EOL> """<STR_LIT>""" <EOL> if value is None : <EOL> return datetime . datetime . today ( ) <EOL> if isinstance ( value , datetime . datetime ) : <EOL> return value <EOL> if isinstance ( value , datetime . date ) : <EOL> return datetime . datetime . fromordinal ( value . toordinal ( ) ) <EOL> if isinstance ( value , ( int , float ) ) : <EOL> return datetime . datetime . fromtimestamp ( value ) <EOL> if isinstance ( value , str ) : <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> if hasattr ( value , "<STR_LIT>" ) : <EOL> return datetime . datetime ( * tuple ( value ) [ : <NUM_LIT:6> ] ) <EOL> return datetime . datetime . fromtimestamp ( value . ticks ( ) ) <EOL> class classproperty ( property ) : <EOL> """<STR_LIT>""" <EOL> def __get__ ( self , obj , cls ) : <EOL> return self . fget ( cls ) <EOL> class _InvalidValue ( object ) : <EOL> """<STR_LIT>""" <EOL> def __eq__ ( self , other ) : <EOL> return not other <EOL> def __ne__ ( self , other ) : <EOL> return not ( other is self ) <EOL> def __bool__ ( self ) : <EOL> return False <EOL> def __int__ ( self ) : <EOL> return <NUM_LIT:0> <EOL> __long__ = __int__ <EOL> def __float__ ( self ) : <EOL> return <NUM_LIT:0.0> <EOL> def __str__ ( self ) : <EOL> return "<STR_LIT>" <EOL> def __unicode__ ( self ) : <EOL> return "<STR_LIT>" <EOL> def __repr__ ( self ) : <EOL> return "<STR_LIT>" <EOL> INVALID_VALUE = _InvalidValue ( ) </s>
