[Zope] input/represent date the European way

Alexandre Ratti alex@gabuzomeu.net
Sun, 05 Mar 2000 12:19:06 +0100


Hi Gidon,


At 12:00 28/02/2000 -0800, you wrote:
>Date: Mon, 28 Feb 2000 19:16:28 +0100
>From: "Gidon Friedman" <gidon@stars.ch>
>Subject: [Zope] input/represent date the European way
(...)

>A) ouput question:
>i have to use :
><dtml-var ab fmt=dd>.<dtml-var ab fmt=mm>.<dtml-var ab fmt=year>
>to show: 28.2.2000
><dtml-var ab fmt=%d.%m.%Y> shows: 27.2.2000
>
>Is there a better way to get the right date the European way?


You may want to take a look at this doc:

<http://www.zope.org/Members/AlexR/CustomDateFormats>

>B) input question:
>i have a form asking for a date. see these examples
>28.2.99      ->  1999/02/28
>2/28/99     ->   1999/02/28
>28.2.00      ->  Invalid Date-Time String
>2/28/00      ->  2000/02/28
>28.2.          ->  Invalid Date-Time String
>
>can i prevent the errors?

On Zope 2.1.4 (Win 32):
- I get "1900/02/28" when entering "2/28/00".
- I get "2000/02/28" when entering  "2/28/2000".

No errors. (I tested this on the Properties tab of a DTML Document).

The issue you report seems to be corrected in the last Zope subversion.


Cheers.

Alexandre