Re: [Zope3-dev] Re: SVN: Zope3/branches/3.3/ Fixed issue 525: DateWidget ru-format

2006-06-28 Thread Christian Theune

Dmitry Vasiliev wrote:

Gary Poster wrote:

However, I'm not sure the new widget behavior is great for non-default 
locales either.  Certainly being able to display dates in a 
locale-specific way is nice, but the input seems to be problematic.  
If you specify an ACCEPT-LANGUAGE of en-US, for instance, you need 
to fill in Dec 2, 2002 12:30:00 PM, if I remember correctly.  Fully 
spelling out December does not work.  Leaving off the seconds 
doesn't work.  Any other format will not work.  I didn't check, but 
assume other languages result in similar restrictions in input.


Yes, the input is a bit problematic in russian too, especially for 
long and full display styles. Unfortunately I didn't get any reply 
on my pre-checkin message 
(http://mail.zope.org/pipermail/zope3-dev/2006-June/019585.html) so I 
guessed no one was interested in the problem.


The data in en.xml could be usable to get a more robust approach, and 
it could even be done without change to zope.i18n for dates.  But 
AFAICT, for datetimes some help would need to be implemented in the 
i18n.locale module (since the order of dates and times is specified in 
the XML); and for datetimes and times I think we'd want to make 
specifying seconds, and maybe even minutes, optional.  This is 
probably doable, but it seems like it might be painful to code and test.


I agree the i18n datetime parsing should be made a bit relaxed. I even 
think the only important thing in this context is the order of the 
fields, so we can ignore spaces (or even ignore some other delimitters?) 
and maybe ignore other non-field characters (for example in the russian 
long format you always need to write year as year 2006 instead of 
the simple 2006).


I'm very much against relaxed date/time format checking. I tend to 
give my user the exact format that is expected and fail otherwise. All 
the guessing in the past led to bad bad errors because the field order 
the user entered was syntactically compatible but had a semantically 
different meaning.


E.g.

02/05/2005 and 02.05.2005 are two different things.

Christian

--
gocept gmbh  co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: SVN: Zope3/branches/3.3/ Fixed issue 525: DateWidget ru-format

2006-06-28 Thread Christian Theune

Wichert Akkerman wrote:

Previously Christian Theune wrote:
I'm very much against relaxed date/time format checking. I tend to 
give my user the exact format that is expected and fail otherwise. All 
the guessing in the past led to bad bad errors because the field order 
the user entered was syntactically compatible but had a semantically 
different meaning.


Shouldn't users use a nice dynamic widget to select dates and times?
That will prevent all these problems.


Hell no. :)

It's much more efficient for a trained user to type '2005-08-08' instead 
of having to click for 2 minutes through a usable nice widget.


BTW: The best UI I ever worked with was an ASCII terminal-software where 
one should select menu entries by typing their numbers. I could 
blindfoldedly navigate through that system much faster than most of the 
software I use today ...


Christian

--
gocept gmbh  co. kg - forsterstraße 29 - 06112 halle/saale - germany
www.gocept.com - [EMAIL PROTECTED] - phone +49 345 122 9889 7 -
fax +49 345 122 9889 1 - zope and plone consulting and development

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] About the issue #525: DateWidget ru-format

2006-06-28 Thread Dmitry Vasiliev

Hi,

I'll plan to rollback the revision 68818 on the 3.3 branch (hmm, should I also 
rollback the revision 68821?) and add Date(time)I18NWidget instead before the 
weekend. It seems so big change for the 3.3 branch and need more discussion 
(also the change broke SchoolTool functional tests).


--
Dmitry Vasiliev (dima at hlabs.spb.ru)
http://hlabs.spb.ru
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] Re: SVN: Zope3/branches/3.3/ Fixed issue 525: DateWidget ru-format

2006-06-28 Thread Paul Winkler
On Wed, Jun 28, 2006 at 11:47:28AM +0200, Christian Theune wrote:
 I'm very much against relaxed date/time format checking. I tend to 
 give my user the exact format that is expected and fail otherwise. All 
 the guessing in the past led to bad bad errors because the field order 
 the user entered was syntactically compatible but had a semantically 
 different meaning.
 
 E.g.
 
 02/05/2005 and 02.05.2005 are two different things.

As another data point, I recently stumbled on this quirk
of zope 2's DateTime class:

 DateTime('2006/01/01').timezone()
'US/Eastern'
 DateTime('2006/01/01').timeTime()
1136091600.0
 DateTime('2006-01-01').timezone()
'GMT+0'
 DateTime('2006-01-01').timeTime()
1136073600.0

AFAICT, this is a feature, not a bug.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com