Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 39525 invoked from network); 12 Sep 2004 04:47:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 12 Sep 2004 04:47:39 -0000 Received: (qmail 17234 invoked by uid 500); 12 Sep 2004 04:47:36 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 17151 invoked by uid 500); 12 Sep 2004 04:47:35 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 17138 invoked by uid 99); 12 Sep 2004 04:47:35 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of flamefew@gmail.com designates 64.233.170.199 as permitted sender) Received: from [64.233.170.199] (HELO mproxy.gmail.com) (64.233.170.199) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 11 Sep 2004 21:47:32 -0700 Received: by mproxy.gmail.com with SMTP id 77so72276rnk for ; Sat, 11 Sep 2004 21:47:30 -0700 (PDT) Received: by 10.38.14.33 with SMTP id 33mr521003rnn; Sat, 11 Sep 2004 21:47:30 -0700 (PDT) Received: by 10.38.164.15 with HTTP; Sat, 11 Sep 2004 21:47:30 -0700 (PDT) Message-ID: <31cc373604091121474be651e5@mail.gmail.com> Date: Sun, 12 Sep 2004 00:47:30 -0400 From: Henri Yandell Reply-To: Henri Yandell To: Jakarta Commons Developers List Subject: Re: Time bugs Was: [lang] FastDateFormat year bug In-Reply-To: <31cc373604091121407cf7a54f@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <7AFC1B69BB12A4449A500E575E6D6B1302555BBF@whexchmb10.bsna.bsroot.bear.com> <31cc3736040910232617346a91@mail.gmail.com> <002b01c497dc$7d038b00$12059b51@oemcomputer> <31cc373604091121407cf7a54f@mail.gmail.com> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Actually, I retract this. If it switches to P'y'Y, then it won't print out 2002 but 02 when it does large durations. I think the 'hack' of using a DateFormat to format durations is stretched here. So 2 problems now. Years are broke in ISO_EXTENDED and dates are broke in FastDateFormat. Hen On Sun, 12 Sep 2004 00:40:51 -0400, Henri Yandell wrote: > testISODurationFormat: > // test fixture from example in > http://www.w3.org/TR/xmlschema-2/#duration > cal.set(1, 1, 3, 10, 30, 0); > cal.set(Calendar.MILLISECOND, 0); > text = DurationFormatUtils.ISO_EXTENDED_FORMAT.format(cal); > assertEquals("P1Y2M3DT10H30M0.0S", text); > > This is, I believe, a bug in our pattern: > > ISO_EXTENDED_FORMAT_PATTERN = "'P'yyyy'Y'M'M'd'DT'H'H'm'M's.S'S'" > > should be: > > ISO_EXTENDED_FORMAT_PATTERN = "'P'y'Y'M'M'd'DT'H'H'm'M's.S'S'" --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org