From: James Herdman Date: 2009-07-31T03:35:24+09:00 Subject: Re: java.text api parallel in Ruby --001485eafe8cfd9a4a046ff090ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Okay. So sample input and output? Normally I'd parse through the Java, but I'm feeling a little lazy. James On Thu, Jul 30, 2009 at 1:21 PM, Venkat Akkineni < venkatram.akkineni@gmail.com> wrote: > James Herdman wrote: > > Did you look at stftime? Perhaps you could provide a concrete example of > > what you're trying to do? Chances are that it's already been done. > > > > James > > > > On Thu, Jul 30, 2009 at 12:17 PM, Venkat Akkineni < > > I am trying to translate an application from java to ruby. The actual > application uses decimal formats to provide localization facilities. I > have the code that I am trying to translate which I will attach with the > post. > > char decimal = '.'; > char grouping = ','; > String formatOutput = null; > String formatInternal = null; > > DecimalFormatSymbols dfs = new DecimalFormatSymbols(); > dfs.setDecimalSeparator(decimal); > dfs.setGroupingSeparator(grouping); > DecimalFormatSymbols dfsEsp = new DecimalFormatSymbols(); > dfsEsp.setDecimalSeparator('.'); > dfsEsp.setGroupingSeparator(','); > FormatCouple fc; > fc = new FormatCouple(new DecimalFormat(formatOutput, dfs), new > DecimalFormat(formatInternal, > dfsEsp)); > hasFormats.put(formatName, fc); > > Any help is appreciated. > > Thanks > Venkat > -- > Posted via http://www.ruby-forum.com/. > > --001485eafe8cfd9a4a046ff090ee--