skip to navigation
skip to content

gocept.month 1.0.2

A datatype which stores a year and a month.

Downloads ↓

Latest Version: 1.1

A datatype which stores a year and a month.

This package provides the data type Month (typical usage: Month(4, 2003)), which supports conversion to and from strings, as well as a zope.schema field and widgets for both zope.formlib and z3c.form.

To use the month field, <include package="gocept.month"/> and declare a schema like this:

>>> import gocept.month
>>> import zope.interface
>>> import zope.schema
>>> class IContract(zope.interface.Interface):
...     title = zope.schema.TextLine(title=u"Contract title")
...     start = gocept.month.MonthField(title=u"Starting date")
...     end = gocept.month.MonthField(title=u"Ending date")

CHANGES

1.0.2 (2011-09-01)

  • Added __contains__ method on Month.

1.0.1 (2011-04-26)

  • Declare dependencies that some upstream packages need but don't declare.
  • Use stdlib's doctest module, not zope.testing's which is deprecated.

1.0 (2009-10-05)

  • Initial public release.
 
File Type Py Version Uploaded on Size # downloads
gocept.month-1.0.2.tar.gz (md5) Source 2011-09-01 9KB 258