106 |
106 |
107 def get_o3lossuvmap_dates(date_show): |
107 def get_o3lossuvmap_dates(date_show): |
108 dates = get_valid_dates(FILES) |
108 dates = get_valid_dates(FILES) |
109 ndates = len(dates) |
109 ndates = len(dates) |
110 ind = dates.index(date_show) |
110 ind = dates.index(date_show) |
|
111 textdates = [] |
111 if ind ==0 : |
112 if ind ==0 : |
112 chosendates = [dates[ind+1]] |
113 chosendates = [dates[ind+1]] |
|
114 textdates.append('next ->') |
|
115 |
113 elif ind >= ndates - 1: |
116 elif ind >= ndates - 1: |
114 chosendates= [dates[ind-1]] |
117 chosendates= [dates[ind-1]] |
|
118 textdates.append('<- last') |
115 else: |
119 else: |
116 chosendates = [dates[ind-1], dates[ind+1]] |
120 chosendates = [dates[ind-1], dates[ind+1]] |
|
121 textdates.append('<- last') |
|
122 textdates.append('next ->') |
117 menue = [] |
123 menue = [] |
118 for date in chosendates: |
124 |
119 text_date = date[-2:] + '.' + date[-4:-2] + '.' |
125 for i in range(len(chosendates)): |
120 menue.append(('/ozoneloss/uvmap/' + date, _(text_date))) |
126 date = chosendates[i] |
|
127 textdate = textdates[i] |
|
128 menue.append(('/ozoneloss/uvmap/' + date, _(textdate))) |
121 return menue |
129 return menue |
122 |
130 |
123 |
131 |
124 def get_vpsc_dates(): |
132 def get_vpsc_dates(): |
125 menue = [ |
133 menue = [ |