Re: [Zope-dev] Problems with schema Date field - year is truncated

2008-08-30 Thread Stephan Richter
On Wednesday 27 August 2008, Hermann Himmelbauer wrote:
> I'm somehow stuck on the following problem:
>
> I defined a Date() schema field in one of my interfaces. I currently have a
> de-AT locale, so I'd like to enter the value of my date as e.g.
> "dd.MM.", e.g. "01.02.1980" in my z3c.form based form.
>
> What happens is, that the locale silently assumes a format of "dd.MM.yy",
> which means, that the "YY / 80" is truncated and "01.02.19" is stored in my
> database, when updating.
>
> So, I'd like to know if:
>
> - It is possible to change the format to "dd.MM.", which is a lot more
> appropriate for my application (a birth date)

The formatting string comes from the ICU locales files. I am welcoming any 
patch (with tests) that makes the date format pluggable in the z3c.form data 
converter.

> - Make the application more strict, meaning that no data is truncated in
> any case.

This has been done for the latest zope.i18n release.

Regards,
Stephan
-- 
Stephan Richter
Web Software Design, Development and Training
Google me. "Zope Stephan Richter"
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Problems with schema Date field - year is truncated

2008-08-27 Thread Hermann Himmelbauer
Hi,
I'm somehow stuck on the following problem:

I defined a Date() schema field in one of my interfaces. I currently have a 
de-AT locale, so I'd like to enter the value of my date as e.g. "dd.MM.", 
e.g. "01.02.1980" in my z3c.form based form.

What happens is, that the locale silently assumes a format of "dd.MM.yy", 
which means, that the "YY / 80" is truncated and "01.02.19" is stored in my 
database, when updating.

So, I'd like to know if:

- It is possible to change the format to "dd.MM.", which is a lot more 
appropriate for my application (a birth date)
- Make the application more strict, meaning that no data is truncated in any 
case.

I tried to stick my nose into i18n.locales but was somehow overwhelmed by what 
I found. However, the following somehow seems to explain it:
 


   
   dd.MM.



   
   dd.MM.yy
   


Nevertheless I don't know if there's a way to select a specific dateFormat, 
e.g. "medium" in my case.

Best Regards,
Hermann

-- 
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
___
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )