src/plugins/TimeLine.py: round all dates to nearest decade
svn: r6746
This commit is contained in:
parent
446f88cd84
commit
6a0bd5cf33
@ -12,6 +12,7 @@
|
|||||||
* src/plugins/Calendar.py: make calendar work in Windows
|
* src/plugins/Calendar.py: make calendar work in Windows
|
||||||
* src/GrampsLocale.py: make calendar work in Windows
|
* src/GrampsLocale.py: make calendar work in Windows
|
||||||
* src/plugins/GraphViz.py: fix unicode encoding
|
* src/plugins/GraphViz.py: fix unicode encoding
|
||||||
|
* src/plugins/TimeLine.py: round all dates to nearest decade
|
||||||
|
|
||||||
2006-05-21 Alex Roitman <shura@gramps-project.org>
|
2006-05-21 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/GrampsDb/_GrampsBSDDB.py: Do not import unused module.
|
* src/GrampsDb/_GrampsBSDDB.py: Do not import unused module.
|
||||||
|
@ -313,8 +313,13 @@ class TimeLine(Report.Report):
|
|||||||
low = min(low,d)
|
low = min(low,d)
|
||||||
high = max(high,d)
|
high = max(high,d)
|
||||||
|
|
||||||
low = (low/10)*10
|
# round the dates to the nearest decade
|
||||||
high = ((high+9)/10)*10
|
low = int((low/10))*10
|
||||||
|
high = int(((high+9)/10))*10
|
||||||
|
|
||||||
|
# Make sure the difference is a multiple of 50 so all year ranges land
|
||||||
|
# on a decade.
|
||||||
|
low -= 50 - ((high-low) % 50)
|
||||||
|
|
||||||
if low == None:
|
if low == None:
|
||||||
low = high
|
low = high
|
||||||
|
Loading…
Reference in New Issue
Block a user