Added valid and empty checks

svn: r26
This commit is contained in:
Don Allingham 2001-05-17 23:11:23 +00:00
parent cfec3097b6
commit 457ea855d6

View File

@ -40,7 +40,6 @@ class Date:
range = 1 range = 1
normal = 0 normal = 0
invalid = -1
from_str = _("(from|between|bet)") from_str = _("(from|between|bet)")
to_str = _("(and|to)") to_str = _("(and|to)")
@ -128,6 +127,18 @@ class Date:
else: else:
return self.start.getFmt3() return self.start.getFmt3()
def isEmpty(self):
if self.start.year == -1 and self.start.month == -1 and self.start.day == -1:
return 1
else:
return 0
def isValid(self):
if self.range == -1:
return 0
else:
return 1
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# #
# #