Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install gocept.month

How to install gocept.month

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install gocept.month
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
1.1
1.2Never BuiltWhy not?
1.1 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Windows (64-bit)
1.1
1.2Never BuiltWhy not?
1.1 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Mac OS X (10.5+)
1.1
1.2Never BuiltWhy not?
1.1 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Linux (32-bit)
1.1
1.2Never BuiltWhy not?
1.1 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
Linux (64-bit)
1.2 Available View build log
1.1 Available View build log
1.0.2 Available View build log
1.0.1 Available View build log
1.0 Available View build log
 
License
ZPL 2.1
Lastest release
version 1.2 on Jan 9th, 2014

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")

To use the form widgets, you need to require the form setuptools extra (i.e. gocept.month[form]), and <include package="gocept.month.browser"/> in your ZCML.

CHANGES

1.2 (2013-02-18)
  • Split off widgets into setuptools extra form, and don't include the browser ZCML by ourselves, so clients can use only the domain part of this package without the UI parts.
  • Added firstOfMonth method to Month.
  • Using zope.formlib >= 4.0 instead of zope.app.form.
  • Updated to ZTK 1.1.5.
1.1 (2012-02-09)
  • Add MonthInterval.forYear().
  • Declared fromString method as a class method in interface.
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.

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.