update
svn: r3549
This commit is contained in:
parent
f19010baa9
commit
ed495982a5
@ -48,7 +48,6 @@ import gtk
|
|||||||
import const
|
import const
|
||||||
import RelLib
|
import RelLib
|
||||||
import Date
|
import Date
|
||||||
import Calendar
|
|
||||||
from TransTable import TransTable
|
from TransTable import TransTable
|
||||||
from gettext import gettext as _
|
from gettext import gettext as _
|
||||||
from Utils import for_each_ancestor
|
from Utils import for_each_ancestor
|
||||||
@ -60,15 +59,14 @@ from Utils import for_each_ancestor
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def date_cmp(rule,value):
|
def date_cmp(rule,value):
|
||||||
sd = rule.get_start_date()
|
sd = rule.get_start_date()
|
||||||
s = sd.mode
|
s = sd.get_modifier()
|
||||||
if s == Calendar.BEFORE:
|
val = s.get_start_date()
|
||||||
return Date.compare_dates(rule,value) == 1
|
if s == Date.MOD_BEFORE:
|
||||||
elif s == Calendar.AFTER:
|
return rule > value
|
||||||
return Date.compare_dates(rule,value) == -1
|
elif s == Date.MOD_AFTER:
|
||||||
elif sd.month == Date.UNDEF and sd.year != Date.UNDEF:
|
return rule < value
|
||||||
return sd.year == value.get_start_date().year
|
|
||||||
else:
|
else:
|
||||||
return Date.compare_dates(rule,value) == 0
|
return rule == value
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user