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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
