From: Douglas S. Blank <dblank@cs...> - 2009-01-04 18:36:02
In trunk, I've made a rather large change in the way that dates are
subtracted from each other. This will show up mostly as better text in
descriptions such as ages, and better ordering in sorts.
In addition, I've enhanced some other details in these date differences,
including translations for plural year/month/days, textual and
translations of representations of ranges, and a couple of bug fixes.
These changes seem to have made date difference comparisons slightly
faster in my tests (about 10%) -- which was unexpected. You can see these
representations on the Relationship View (the Death line now shows the age
at death, or otherwise the current age of the person), or you can see a
bunch in sorted order by running the Age-On-Date Gramplet, and sorting on
the age column. You'll see text like:
"about 55 years"
"less than 10 years, 1 day"
"between 11 months, 10 days and 1 year, 2 months"
which should be sorted in the right place. You may see negative spans
(like "about -5 years") which can happen if someone was born "about 1905"
and you are looking for people alive in 1900. This will also depend on
your settings for about, before, and after---which you can now change in
Preferences (Thanks, romjerome!)
Rob, you can get a more full textual description of date differences with:
span = date1 - date2
srepr = span.format(precision=3)
which will give year, month, and day details (if available). One can also
get details on the min/max difference spread, and raw number of days
If you have any issues, comments, or questions, please let me know!
Get latest updates about Open Source Projects, Conferences and News.