#NEWLINE# def _parse_token( self , token , value , parts ) : #NEWLINE# #INDENT# if ( value == 'YYYY' ) : #NEWLINE# #INDENT# parts [ 'year' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'YY' ) : #NEWLINE# #INDENT# value = int ( value ) #NEWLINE# parts [ 'year' ] = ( ( 1900 + value ) if ( value > 68 ) else ( 2000 + value ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'MMMM' , 'MMM' ] ) : #NEWLINE# #INDENT# parts [ 'month' ] = self . locale . month_number ( value . lower ( ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'MM' , 'M' ] ) : #NEWLINE# #INDENT# parts [ 'month' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'DD' , 'D' ] ) : #NEWLINE# #INDENT# parts [ 'day' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'Do' ] ) : #NEWLINE# #INDENT# parts [ 'day' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token . upper ( ) in [ 'HH' , 'H' ] ) : #NEWLINE# #INDENT# parts [ 'hour' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'mm' , 'm' ] ) : #NEWLINE# #INDENT# parts [ 'minute' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'ss' , 's' ] ) : #NEWLINE# #INDENT# parts [ 'second' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'SSSSSS' ) : #NEWLINE# #INDENT# parts [ 'microsecond' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'SSSSS' ) : #NEWLINE# #INDENT# parts [ 'microsecond' ] = ( int ( value ) * 10 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'SSSS' ) : #NEWLINE# #INDENT# parts [ 'microsecond' ] = ( int ( value ) * 100 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'SSS' ) : #NEWLINE# #INDENT# parts [ 'microsecond' ] = ( int ( value ) * 1000 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'SS' ) : #NEWLINE# #INDENT# parts [ 'microsecond' ] = ( int ( value ) * 10000 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'S' ) : #NEWLINE# #INDENT# parts [ 'microsecond' ] = ( int ( value ) * 100000 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token == 'X' ) : #NEWLINE# #INDENT# parts [ 'timestamp' ] = int ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'ZZZ' , 'ZZ' , 'Z' ] ) : #NEWLINE# #INDENT# parts [ 'tzinfo' ] = TzinfoParser . parse ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( token in [ 'a' , 'A' ] ) : #NEWLINE# #INDENT# if ( value in ( self . locale . meridians [ 'am' ] , self . locale . meridians [ 'AM' ] ) ) : #NEWLINE# #INDENT# parts [ 'am_pm' ] = 'am' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( value in ( self . locale . meridians [ 'pm' ] , self . locale . meridians [ 'PM' ] ) ) : #NEWLINE# #INDENT# parts [ 'am_pm' ] = 'pm'