Class IS_DATETIME_IN_RANGE
source code
object --+
|
Validator --+
|
IS_DATETIME --+
|
IS_DATETIME_IN_RANGE
example:
>>> v = IS_DATETIME_IN_RANGE( minimum=datetime.datetime(2008,1,1,12,20), maximum=datetime.datetime(2009,12,31,12,20), format="%m/%d/%Y %H:%M",error_message="oops")
>>> v('03/03/2008 12:40')
(datetime.datetime(2008, 3, 3, 12, 40), None)
>>> v('03/03/2010 10:34')
(datetime.datetime(2010, 3, 3, 10, 34), 'oops')
>>> v(datetime.datetime(2008,3,3,0,0))
(datetime.datetime(2008, 3, 3, 0, 0), None)
>>> v(datetime.datetime(2010,3,3,0,0))
(datetime.datetime(2010, 3, 3, 0, 0), 'oops')
|
|
__init__(self,
minimum=global_settings.applications_parent,
maximum=global_settings.applications_parent,
format='%Y-%m-%d %H:%M:%S',
error_message=global_settings.applications_parent)
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature |
source code
|
|
|
|
|
|
Inherited from IS_DATETIME:
formatter
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|
|
Inherited from object:
__class__
|
__init__(self,
minimum=global_settings.applications_parent,
maximum=global_settings.applications_parent,
format='%Y-%m-%d %H:%M:%S',
error_message=global_settings.applications_parent)
(Constructor)
| source code
|
x.__init__(...) initializes x; see x.__class__.__doc__ for
signature
- Overrides:
IS_DATETIME.__init__
|