<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>web development helpdesk &#187; format</title>
	<atom:link href="http://helpdesk.objects.com.au/tag/format/feed" rel="self" type="application/rss+xml" />
	<link>http://helpdesk.objects.com.au</link>
	<description>objects quality - the visible difference</description>
	<lastBuildDate>Sun, 17 Jul 2011 12:27:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>How to parse value using locale rules</title>
		<link>http://helpdesk.objects.com.au/java/how-to-parse-value-using-locale-rules?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-parse-value-using-locale-rules</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-parse-value-using-locale-rules#comments</comments>
		<pubDate>Sat, 19 Feb 2011 02:22:15 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[Locale]]></category>
		<category><![CDATA[NumberFormat]]></category>
		<category><![CDATA[parse]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1763</guid>
		<description><![CDATA[The NumberFormat and DecimalFormat classes provide support for parsing and formatting values. They are also locale sensitive, which means they adjust the formatting and parsing rules according to the locale or region of interest. For example in France they use a comma as a decimal separator so 5,48 is the same as 5.48 in the [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-parse-value-using-locale-rules/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to format a currency value</title>
		<link>http://helpdesk.objects.com.au/java/how-to-format-a-currency-value?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-format-a-currency-value</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-format-a-currency-value#comments</comments>
		<pubDate>Tue, 15 Feb 2011 22:12:46 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[Currency]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[money]]></category>
		<category><![CDATA[NumberFormat]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1830</guid>
		<description><![CDATA[The NumberFormat class provides support for currency formatting. By current default Locale is used to determine what currency the value should be formatted in. double value = 6.34; NumberFormat formatter = NumberFormat.getCurrencyInstance(); String formatted = formatter.format(value); Related posts: How to parse a currency value using Java The NumberFormat and DecimalFormat classes provide support for parsing [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-format-a-currency-value/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to format value as a percentage</title>
		<link>http://helpdesk.objects.com.au/java/how-to-format-value-as-a-percentage?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-format-value-as-a-percentage</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-format-value-as-a-percentage#comments</comments>
		<pubDate>Mon, 13 Dec 2010 21:50:25 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[float]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[NumberFormat]]></category>
		<category><![CDATA[percent]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1723</guid>
		<description><![CDATA[When you need to format a number as a percent you can use the &#8216;%&#8217; symbol in your DecimalFormat string. The static helper method getPercentInstance() can also be used if you don&#8217;t need complete control over the format string. When the % symbol is used the value is first multiplied by 100 before applying the [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-format-value-as-a-percentage/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Display a month as a calendar</title>
		<link>http://helpdesk.objects.com.au/java/display-a-month-as-a-calendar?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=display-a-month-as-a-calendar</link>
		<comments>http://helpdesk.objects.com.au/java/display-a-month-as-a-calendar#comments</comments>
		<pubDate>Tue, 27 Jul 2010 01:45:38 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[calendar]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[month]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1548</guid>
		<description><![CDATA[The Calendar class can be used to generate a simple calendar display. private static void showMonth(Calendar cal) { int month = cal.get(Calendar.MONTH); int firstDayOfWeek = cal.getFirstDayOfWeek(); // Display day names as headers cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek()); for (int i=0; i&#60;7; i++) { System.out.print(cal.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.SHORT, Locale.getDefault())); System.out.print(&#34; &#34;); cal.add(Calendar.DATE, 1); } System.out.println(); // Display dates in month cal.set(Calendar.DATE, [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/display-a-month-as-a-calendar/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to zero pad a value</title>
		<link>http://helpdesk.objects.com.au/java/how-to-zero-pad-a-value?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-zero-pad-a-value</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-zero-pad-a-value#comments</comments>
		<pubDate>Thu, 15 Apr 2010 00:21:25 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[pad]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=1454</guid>
		<description><![CDATA[public static String zeroPad(int value, int width) { return String.format(&#34;%0&#34;+width+&#34;d&#34;, value); } Related posts: How to pad a Java String Often we need to left or right pad a string,... How do I format a Date as a String? Either use the format() method of the SimpleDateFormat class, or... How to format value as a [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-zero-pad-a-value/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rounding strategy used by DecimalFormat?</title>
		<link>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=rounding-strategy-used-by-decimalformat</link>
		<comments>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat#comments</comments>
		<pubDate>Mon, 23 Feb 2009 08:57:33 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[DecimalFormat]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[rounding]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=811</guid>
		<description><![CDATA[Decimal format uses BigDecimal.ROUND_HALF_EVEN and prior to 1.6 this cannot be changed. In 1.6 a setRoundingMethod() was added to allow the rounding strategy to be changed. DecimalFormat df = NumberFormat.getNumberInstance(); df.setRoundingMode(1, RoundingMode.HALF_UP); String formatted = df.format(12.345); If you need an alternate rounding strategy prior to 1.6 then you need to use BigDecimal to do your [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/rounding-strategy-used-by-decimalformat/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I format a Date as a String?</title>
		<link>http://helpdesk.objects.com.au/java/how-do-i-format-a-date-as-a-string?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-do-i-format-a-date-as-a-string</link>
		<comments>http://helpdesk.objects.com.au/java/how-do-i-format-a-date-as-a-string#comments</comments>
		<pubDate>Wed, 01 Oct 2008 13:16:02 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=371</guid>
		<description><![CDATA[Either use the format() method of the SimpleDateFormat class, or the (static) format() method of the String class. DateFormat dateFormat = new SimpleDateFormat(&#34;hhmmddMMyy&#34;); Date today = new Date(); String formatted = dateFormat.format(today); String formatted2 = String.format(&#34;%&#60;tH%&#60;tM%&#60;tS%tY%&#60;tm%&#60;td&#34;, today); Related posts: How do I parse a Java String that specifies a Date? Use the parse() method of [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-do-i-format-a-date-as-a-string/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to format a number to a certain number of significant figures, as opposed to decimal places?</title>
		<link>http://helpdesk.objects.com.au/java/how-to-format-a-number-to-a-certain-number-of-significant-figures-as-opposed-to-decimal-places?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-format-a-number-to-a-certain-number-of-significant-figures-as-opposed-to-decimal-places</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-format-a-number-to-a-certain-number-of-significant-figures-as-opposed-to-decimal-places#comments</comments>
		<pubDate>Wed, 01 Oct 2008 12:26:50 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[BigDecimal]]></category>
		<category><![CDATA[format]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=333</guid>
		<description><![CDATA[That’s a job for the BigDecimal class public static String formatToSignificant(double value, int significant) { MathContext mathContext = new MathContext(significant, RoundingMode.DOWN); BigDecimal bigDecimal = new BigDecimal(value, mathContext); return bigDecimal.toPlainString(); } Related posts: How to control decimal places displayed in JTable column? Rendering of table cells is handled by instances of TableCellRenderer.... How to round decimal [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-format-a-number-to-a-certain-number-of-significant-figures-as-opposed-to-decimal-places/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to format a double as a String?</title>
		<link>http://helpdesk.objects.com.au/java/how-to-format-a-double-as-a-string?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-format-a-double-as-a-string</link>
		<comments>http://helpdesk.objects.com.au/java/how-to-format-a-double-as-a-string#comments</comments>
		<pubDate>Thu, 25 Sep 2008 02:11:26 +0000</pubDate>
		<dc:creator>objects</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[double]]></category>
		<category><![CDATA[format]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://helpdesk.objects.com.au/?p=246</guid>
		<description><![CDATA[Create an instance of DecimalFormat with the required format and use its format() method to format the double value. See the DecimalFormat javadoc for details on specifying format. double d = 1.23456789; // Use 2 decimal places NumberFormat numberFormat = new DecimalFormat(&#34;#.##&#34;); String s = numberFormat.format(d); System.out.println(s); // Outputs: 1.23 Related posts: How to format [...]]]></description>
		<wfw:commentRss>http://helpdesk.objects.com.au/java/how-to-format-a-double-as-a-string/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

