    Expiration widget
    -----------------

    Edit renderer. Active with no expiration date by default::

        >>> from yafowil.base import factory
        >>> widget = factory(
        ...     'expiration',
        ...     name='active',
        ...     props={
        ...         'datepicker': True,
        ...         'locale': 'de',
        ...     })
        >>> widget()
        u'
until
    '

    Active with no expiration date::

        >>> request = dict()
        >>> request['active.active'] = '1'
        >>> request['active'] = ''
        >>> data = widget.extract(request)
        >>> data.extracted
>>> widget(request=request) u'
until
    '

    Inactive::

        >>> request = dict()
        >>> request['active.active'] = '0'
        >>> request['active'] = ''
        >>> data = widget.extract(request)
        >>> data.extracted
        0

    Active with expiration date::

        >>> request = dict()
        >>> request['active.active'] = '1'
        >>> request['active'] = '23.12.2012'
        >>> data = widget.extract(request)
        >>> data.extracted
        1356217200.0

    Edit renderer with preset value::

        >>> widget = factory(
        ...     'expiration',
        ...     name='active',
        ...     value=0,
        ...     props={
        ...         'datepicker': True,
        ...         'locale': 'de',
        ...     })
        >>> widget()
        u'
until
    '

        >>> import datetime
        >>> widget = factory(
        ...     'expiration',
        ...     name='active',
        ...     value=1356217200.0,
        ...     props={
        ...         'datepicker': True,
        ...         'locale': 'de',
        ...     })
        >>> widget()
        u'
until
    '

    Display renderer::

        >>> from yafowil.base import factory
        >>> widget = factory(
        ...     'expiration',
        ...     name='active',
        ...     props={
        ...         'datepicker': True,
        ...         'locale': 'de',
        ...     },
        ...     mode='display')
        >>> widget()
        u'
    '

        >>> widget = factory(
        ...     'expiration',
        ...     name='active',
        ...     value=0,
        ...     props={
        ...         'datepicker': True,
        ...         'locale': 'de',
        ...     },
        ...     mode='display')
        >>> widget()
        u'
    '

        >>> widget = factory(
        ...     'expiration',
        ...     name='active',
        ...     value=1356217200.0,
        ...     props={
        ...         'datepicker': True,
        ...         'locale': 'de',
        ...         'format': '%Y.%m.%d',
        ...     },
        ...     mode='display')
        >>> widget()
        u'
until
2012.12.23
'