#NEWLINE# def formatDates( self , article , dateformat ) : #NEWLINE# #INDENT# if ( None != article [ 'viewed' ] ) : #NEWLINE# #INDENT# article [ 'viewed' ] = article [ 'viewed' ] . strftime ( dateformat ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# article [ 'viewed' ] = '' #NEWLINE# #UNINDENT# if ( None != article [ 'added' ] ) : #NEWLINE# #INDENT# article [ 'added' ] = article [ 'added' ] . strftime ( article ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# article [ 'added' ] = '' #NEWLINE# #UNINDENT# article [ 'date' ] = article [ 'date' ] . strftime ( dateformat ) #NEWLINE# return article