|
@@ -3421,7 +3421,8 @@ def my_timeFormat(_time,page_time):
|
|
|
month = str(int(month))
|
|
|
day = str(int(day))
|
|
|
time_list.append("%s-%s-%s"%(year,month.rjust(2,"0"),day.rjust(2,"0")))
|
|
|
- if idx==1 and not global_year:
|
|
|
+ # if idx==1 and not global_year:
|
|
|
+ if not global_year:
|
|
|
global_year = year
|
|
|
return time_list,global_year
|
|
|
|
|
@@ -3511,7 +3512,7 @@ def getTimeAttributes(list_entity,list_sentence,page_time):
|
|
|
if _time_list:
|
|
|
new_time_entitys.append([_entity,_time_list,_year])
|
|
|
year_list.append(_year)
|
|
|
- year_list = [(y,year_list.count(y)) for y in year_list]
|
|
|
+ year_list = [(y,year_list.count(y)) for y in year_list if y[:2]=='20']
|
|
|
year_list.sort(key=lambda x:x[1],reverse=True)
|
|
|
most_year = year_list[0][0]
|
|
|
time_entitys = [item for item in new_time_entitys if int(item[2])-int(most_year)<=10 and int(item[2])-int(most_year)>=-1]
|