* src/Calendar.py: removed
* src/Gregorian.py: removed * src/Hebrew.py: removed * src/Julian.py: removed * src/calendars/Islamic.py: removed * src/calendars/Persian.py: removed * src/calendars/Makefile.am: removed * src/Date.py: New, simpler date structure * src/DateHandler.py: Start of a class to abstract and select parser and display functions based off locale * src/DateParser.py: base date parsing class (US English) * src/DateDisplay.py: base date display class (US English) * src/DateEdit.py: handle new date method * src/EditPerson.py: handle new date method * src/EventEdit.py: handle new date method * src/GrampsCfg.py: removed redundant options due to new date class * src/StartupDialog.py: removed redundant options due to new date class * src/Makefile.am: handle file changes * src/Sort.py: handle new date method * src/ReadGedcom.py: handle new date method * src/ReadXML.py: handle new date method * src/WriteGedcom.py: handle new date method * src/WriteXML.py: handle new date method * src/RelLib.py: handle new date method * src/gramps_main.py: handle new date method * src/gramps.glade: handle new date method svn: r3546
This commit is contained in:
11
src/Sort.py
11
src/Sort.py
@@ -62,16 +62,7 @@ def build_sort_date(n):
|
||||
use as a sort key in a GtkCList. The resultant string is in the format
|
||||
of YYYYMMDD. Unknown values are given as all nines, so that the
|
||||
appear at the end"""
|
||||
y = n.start.year
|
||||
if y < 0:
|
||||
y = 9999
|
||||
m = n.start.month
|
||||
if m < 0:
|
||||
m = 99
|
||||
d = n.start.day
|
||||
if d < 0:
|
||||
d = 99
|
||||
return "%04d%02d%02d" % (y,m,d)
|
||||
return "%010d" % n.get_sort_value()
|
||||
|
||||
class Sort:
|
||||
def __init__(self,database):
|
||||
|
Reference in New Issue
Block a user