Skip to content

DateTimeFormat.parse() rejects four-digit years when pattern is 'M/d/yy' #11

@tseaver

Description

@tseaver

In https://bugs.launchpad.net/zope.i18n/+bug/677650, @mgedmin reported:

I've a zope.schema.Date field in a z3c.form. It accepts dates like

    11/20/10

but rejects dates like

   11/20/2010

with an error of "The datetime string did not match the pattern u'M/d/yy'."

This is rather unfriendly; the date is clearly unambiguous and should be accepted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions