From dev-return-62921-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Sat Jul 03 17:08:40 2004 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 79699 invoked from network); 3 Jul 2004 17:08:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 3 Jul 2004 17:08:40 -0000 Received: (qmail 50238 invoked by uid 500); 3 Jul 2004 17:08:36 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 50010 invoked by uid 500); 3 Jul 2004 17:08:31 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 49817 invoked by uid 99); 3 Jul 2004 17:08:26 -0000 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [192.18.33.10] (HELO exchange.sun.com) (192.18.33.10) by apache.org (qpsmtpd/0.27.1) with SMTP; Sat, 03 Jul 2004 10:08:24 -0700 Received: (qmail 21237 invoked by uid 50); 3 Jul 2004 17:09:34 -0000 Date: 3 Jul 2004 17:09:34 -0000 Message-ID: <20040703170934.21236.qmail@nagoya.betaversion.org> From: bugzilla@apache.org To: dev@cocoon.apache.org Cc: Subject: DO NOT REPLY [Bug 29881] - Problems using datatype type="date" variant="time" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=29881 Problems using datatype type="date" variant="time" ------- Additional Comments From bruno@outerthought.org 2004-07-03 17:09 ------- Colin, with some small changes to the FormattingDateConvertor class I think your issues would be solved. First, to avoid any confusion, I'd like to point out there's no time-variant of the date datatype. There's only one date datatype, corresponding to the java.util.Date class, which holds both date and time information. It is then by using the "formatting" convertor for dates that you can choose to only show/parse the date and/or time component. The variant (date, time, datetime) that you specify to the formatting convertor is just a hint as to retrieve a default formatting (for some locale). If you specify the pattern explicitely, then this doesn't influence the display/parse of the date anymore. However, the variant is still useful to show a more specific error message to the user, and to show the calendar popup only when it makes sense. So all that's needed is some small changes to FormattingDateConvertor: - in generateSaxFragment(), add a variant attribute - in convertFromString(), use a more specific i18n key (and add them to the resource bundles as well) Not a big change, but I don't have time for it right now. Patches welcome. PS: the attribute datatype="date" on the fd:convertor element has no meaning when used in the form definition.