Re: [morph-developer] Using format object to translate strings
Brought to you by:
orangeherbert,
sgarlatm
From: Matt S. <Mat...@wh...> - 2007-02-08 17:02:28
|
Hi David, I believe the functionality you are asking about would be expressed in Morph's TextToNumberConverter. In the process of writing the converter, it seemed to me that the use of the JDK's built in Format object was limiting for parsing dates, and not as robust as I would like. For example, I want users to be able to type in a variety of different formats when they mean -5000. It might be (5000) or -5000 or (-5,000.00) or even -(5.000,00) if the user is Dutch. I don't want to have to define a half dozen different number formats and the TextToNumberConverter attempts to be more robust than a JDK Format object. I actually was working on this recently and hadn't even checked in my changes yet, but they are ready so I just checked them in. You can access the code through annonymous SVN by connecting to svn://development.spiderstrategies.com/composite svn://development.spiderstrategies.com/morph Please let me know if this meets your needs, or if it doesn't what changes would be required to meet your needs. Also, if you wouldn't mind, please address questions to mor...@li.... There may be someone else on the list that is able to answer your questions faster or better than I. Matt David Putnam wrote: > Message body follows: > > Hello, > > I was looking at your application to replace a home-grown > library to read datafiles. Currently the library uses > SimpleDateFormat to parse dates in a variety of styles. I am > trying to solve, in a generic way, parsing numeric formats > with implied decimal points (think COBOL PIC 99v99). > > I did not see your code use Format to influence style and > conversion, and was wondering if you considered this > functionality and discarded it for a specific reason. > > Thanks for your help, > David > > -- > This message has been sent to you, a registered SourceForge.net user, > by another site user, through the SourceForge.net site. This message > has been delivered to your SourceForge.net mail alias. You may reply > to this message using the "Reply" feature of your email client, or > using the messaging facility of SourceForge.net at: > https://sourceforge.net/sendmessage.php?touser=1607872 > > > |