Class IS_DATE_IN_RANGE
source code
object --+
|
Validator --+
|
IS_DATE --+
|
IS_DATE_IN_RANGE
example:
>>> v = IS_DATE_IN_RANGE(minimum=datetime.date(2008,1,1), maximum=datetime.date(2009,12,31), format="%m/%d/%Y",error_message="oops")
>>> v('03/03/2008')
(datetime.date(2008, 3, 3), None)
>>> v('03/03/2010')
('03/03/2010', 'oops')
>>> v(datetime.date(2008,3,3))
(datetime.date(2008, 3, 3), None)
>>> v(datetime.date(2010,3,3))
(datetime.date(2010, 3, 3), 'oops')
|
|
__init__(self,
minimum=None,
maximum=None,
format='%Y-%m-%d',
error_message=None,
timezone=None)
timezome must be None or a pytz.timezone("America/Chicago")
object |
source code
|
|
|
|
|
|
Inherited from IS_DATE:
formatter
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|
|
Inherited from object:
__class__
|
__init__(self,
minimum=None,
maximum=None,
format='%Y-%m-%d',
error_message=None,
timezone=None)
(Constructor)
| source code
|
timezome must be None or a pytz.timezone("America/Chicago")
object
- Overrides:
object.__init__
- (inherited documentation)
|