Committing my fix to bug #4550:
OnThisDay.py disregards calendar differences (e.g., Julian vs Gregorian) - PATCH OK'ed by dsblank svn: r16659
This commit is contained in:
parent
d3afa6c414
commit
552d11ad8e
@ -61,6 +61,8 @@ def run(database, document, main_event):
|
|||||||
else:
|
else:
|
||||||
main_date = main_event.get_date_object()
|
main_date = main_event.get_date_object()
|
||||||
|
|
||||||
|
cal = main_date.get_calendar();
|
||||||
|
|
||||||
# setup the simple access functions
|
# setup the simple access functions
|
||||||
sdb = SimpleAccess(database)
|
sdb = SimpleAccess(database)
|
||||||
sdoc = SimpleDoc(document)
|
sdoc = SimpleDoc(document)
|
||||||
@ -81,6 +83,7 @@ def run(database, document, main_event):
|
|||||||
|
|
||||||
for event in database.iter_events():
|
for event in database.iter_events():
|
||||||
date = event.get_date_object()
|
date = event.get_date_object()
|
||||||
|
date.convert_calendar(cal)
|
||||||
if date.get_year() == 0:
|
if date.get_year() == 0:
|
||||||
continue
|
continue
|
||||||
if (date.get_year() == main_date.get_year() and
|
if (date.get_year() == main_date.get_year() and
|
||||||
|
Loading…
Reference in New Issue
Block a user