#NEWLINE# def calendars( self ) : #NEWLINE# #INDENT# map = [ ( 30521 , 'Monday' ) , ( 30522 , 'Tuesday' ) , ( 30523 , 'Wednesday' ) , ( 30524 , 'Thursday' ) , ( 30525 , 'Friday' ) , ( 30526 , 'Saturday' ) , ( 30527 , 'Sunday' ) , ( 30528 , 'January' ) , ( 30529 , 'February' ) , ( 30530 , 'March' ) , ( 30531 , 'April' ) , ( 30532 , 'May' ) , ( 30533 , 'June' ) , ( 30534 , 'July' ) , ( 30535 , 'August' ) , ( 30536 , 'September' ) , ( 30537 , 'October' ) , ( 30538 , 'November' ) , ( 30539 , 'December' ) ] #NEWLINE# for i in range ( 0 , 30 ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# name = ( self . datetime - datetime . timedelta ( days = i ) ) #NEWLINE# name = ( '[B]%s[/B] : %s' % ( name . strftime ( '%A' ) , name . strftime ( '%d %B' ) ) ) #NEWLINE# for m in map : #NEWLINE# #INDENT# name = name . replace ( m [ 1 ] , control . lang ( m [ 0 ] ) . encode ( 'utf-8' ) ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# name = name . encode ( 'utf-8' ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# url = ( self . calendar_link % ( ( self . datetime - datetime . timedelta ( days = i ) ) . strftime ( '%Y-%m-%d' ) , '1' ) ) #NEWLINE# self . list . append ( { #NEWLINE# #INDENT# 'name' : name , #NEWLINE# 'url' : url , #NEWLINE# 'image' : 'calendar.jpg' , #NEWLINE# 'action' : 'calendar' , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# self . addDirectory ( self . list ) #NEWLINE# return self . list