commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Helck" <Chris.He...@us.icap.com>
Subject Beanutils: Problem with DateConverter
Date Fri, 05 Oct 2007 16:19:54 GMT
Hi,

I'm trying to use the DateConverter, and it just doesn't seem to work
(or I don't understand it). Here's my code:

        DateConverter converter = new DateConverter();
        converter.setPattern("MM/dd/yy");
        ConvertUtils.register(converter, java.util.Date.class);

        System.out.println(ConvertUtils.convert(new Date()));

The output is: Fri Oct 05 12:22:34 EDT 2007
I expected to see: 10/5/07 

I'm using version 1.8.0-BETA that I rebuilt from the source. I'm aware
of the bug BEANUTILS-283, but I think I've got the fix.

Regards,
Christopher Helck



**********************************************************************
This communication and all information (including, but not limited to,
 market prices/levels and data) contained therein (the "Information") is
 for informational purposes only, is confidential, may be legally
 privileged and is the intellectual property of ICAP plc and its affiliates
 ("ICAP") or third parties. No confidentiality or privilege is waived or
 lost by any mistransmission. The Information is not, and should not
 be construed as, an offer, bid or solicitation in relation to any
 financial instrument or as an official confirmation of any transaction.
 The Information is not warranted, including, but not limited, as to
 completeness, timeliness or accuracy and is subject to change
 without notice. ICAP assumes no liability for use or misuse of the
 Information. All representations and warranties are expressly
 disclaimed. The Information does not necessarily reflect the views of
 ICAP. Access to the Information by anyone else other than the
 recipient is unauthorized and any disclosure, copying, distribution or
 any action taken or omitted to be taken in reliance on it is prohibited. If
 you receive this message in error, please immediately delete it and all
 copies of it from your system, destroy any hard copies of it and
 notify the sender.
**********************************************************************


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message