Change Log

mxDateTime Change Log

The change log includes a detailed description of all changes to this package in the recent releases.
Version: 3.1.3

Changes from 3.1.0 to 3.1.2

  • Fixed: mxDateTime now also provides a strptime() function on Windows.

Changes from 3.0.0 to 3.1.0

  • Fixed: Negative day values were not normalized correctly. Thanks to Eugene Chow.

Changes from 2.0.3 to 3.0.0

  • Changed: Made Error a subclass of ValueError instead of Python's StandardError.

  • Enhanced the (still undocumented) Locale module a bit to provide more flexible date/time presentations. Made the the default formats a little nicer.

  • Added better range error reporting.

  • Changed: the way seconds are display in DateTime string representations. Previously, the seconds value was truncated to 2 decimal places, now the seconds value is rounded except for values >=59.995 and <60.00. These are all mapped to 59.99. This strategy enhances accuracy when exchanging DateTime string data with other data sources or storages e.g. databases.

  • Clarified the doc-strings: most C APIs do not accept keyword arguments (might change in a future release, though).

  • Added updated numdate.py example; J.J. Dukarm send me a corrected copy which now deals correctly with centuries (rather than milleniums ;-).

  • Added support for RelativeDateTime hashing and equality comparison tests.

  • Added new 'usiso' style date parser for YYYY/MM/DD.

  • Fixed a bug which only shows up in Python debug builds: _Py_ForgetReference() was not used correctly by the free list implementations.

  • Added new 'X days HH:MM' style date/time delta parsing support (needed for PostgreSQL).

  • Changed the way 86400.0 is mapped to broken down time values. Previously, this used to map to 24:00:00, now this returns 23:59:60 and can be used to represent leap seconds.

  • Added a work-around for the Intel platform quirk where C doubles are truncated in precision when passed from the FPU (80 bits) to the stack (64 bits). This caused glitches like e.g. date/time arithmetic to generate output like 24:00:00 which is reserved for leap seconds.

  • Fixed a bug in the AM/PM parsing of Parser.py. Thanks to Dmitri D. Sayakin.

  • Added attributes __roles__ and __allow_access_to_unprotected_subobjects__ to DateTime, DateTimeDelta and RelativeDateTime objects to enable using these in Zope Page Templates.

  • Fixed a bug in hash algorithm for RelativeDateTime instances. The hash value for None is now hardcoded.

  • Added source code encoding markers to those files that need it.

  • Fixed bugglet in parser which caused the day to sometimes come out as string in _parse_date().

  • strptime() error messages now include the faulty string.

  • Parser.TimeFromString() is now a real parser in its own right (it was previously aliased to DateTimeDeltaFromString). This also caused a bug to be fixed: the AM/PM parsing was (and still is) missing from the DateTimeDeltaFromString parser.

  • Relative time formats now also support the comma as decimal point (this is required by the ISO standard).

  • Changed: .tuple() used to return floats for the seconds value. This has been changed to integers to avoid a DeprecationWarning when using the tuple with time module APIs (they expect an integer for seconds).

  • Changed: type names now include the complete Python module path, i.e. mx.DateTime.DateTime and mx.DateTime.DateTimeDelta.

  • Added some more fixes to work around warnings with floats being passed to integer argument parsers.

  • Made some integer division cases more robust to prepare for Python3.

  • DateTimeFromTicks() will now raise an Error in case the underlying localtime() C API returns an error.

  • Added support to parse non-standards conform ISO dates such as 2003-1-1.

  • Changed: the DateTimeFrom() et al. APIs to pass on keywords to the underlying mx.DateTime.Parser APIs. This allows e.g. restricting formats to be parsed.

  • Relaxed time parsing in Parser.DateTimeFromString() by adding a separate time_formats parameter which defaults to a standard set of parser, including 'unknown'.

  • Added preliminary Unicode support to string parser. This will work by virtue of auto-conversion.

  • Added work-around for the .strftime() method so that it will correctly output the timezone even if the underlying C function doesn't determine the day light saving time by itself when invoked with -1 in this field (reported by Shawn Dyer).

  • Changed: Normalized the time part of the RelativeDateTime() string representation, so that fractional hours and minutes values are shown as minutes and seconds. Seconds are still truncated to integers.

Changes from 2.0.2 to 2.0.3:

  • Made the date/time parser case-insensitive and extended it to also parse many Eurpean literal date/time formats, such as 'Sonntag, der 6. November 1994, 08:49:37 GMT'

  • Fixed a bug in TimeFromTicks(); thanks to Alex Martelli for finding this one.

  • Added a new example numdate.py by J.J. Dukarm to the Examples directory which demonstrates writing date/time parsers using different more strict conventions. Thanks to JJD for this one !

  • Fixed the Max/MinDateTime constant and the range checks in mxDateTime.c to 32-bit values. This allows mxDateTime to compile correctly on 64-bit platforms. Thanks to Trond Glomsrod for pointing this out.

  • Made the date/time parser even more flexible and added support for partial date formats ('month/day', 'litmonth day', 'day.month.') as well as mixes of different formats. Another new supported format is 'MM-DD-YYYY' (note that the four year digits are important to distinguish this format from ISO).

  • Added 'AM/PM' support to the Parser module.

  • Made the C extension extra careful about float rounding bugs, so that dates like 2001-01-01 24:00:00 don't happen anymore. Chuck Esterbrook mentioned that 2.0.2 still had problems on Mandrake (sigh) with e.g. DateTime(2000,12,31)+1.

  • Fixed the REs in DateTime.Parser to work with sre from Python 2.2 (group names have to be unique).

Changes from 2.0.0 to 2.0.2:

  • Fixed two typos in the Locale submodule. Thanks to Raul Garcia Garcia for spotting these.

  • Fixed a bug in the coercion code which surfaced due to the rich comparison changes in Python 2.1. Python 2.1 will now compare DateTime[Delta] objects to other objects without raising a TypeError.