Java Number Format Pattern getNumberFraction2Format(final Locale locale)

Here you can find the source of getNumberFraction2Format(final Locale locale)

Description

get Number Fraction Format

License

Open Source License

Declaration

public static NumberFormat getNumberFraction2Format(final Locale locale) 

Method Source Code

//package com.java2s;
// ProjectForge is dual-licensed.

import java.text.NumberFormat;

import java.util.Locale;

public class Main {
    public static NumberFormat getNumberFraction2Format(final Locale locale) {
        final NumberFormat format = NumberFormat.getNumberInstance(locale);
        format.setMaximumFractionDigits(2);
        format.setMinimumFractionDigits(2);
        return format;
    }/*from w w  w  .j  ava2s . c o  m*/
}

Related

  1. getNumberFormat(String localeStr)
  2. getNumberFormatFromCache(Locale locale, Currency currency)
  3. getNumberFormatInstanceFor2DecimalDigits()
  4. getNumberFormatter()
  5. getNumberFormatter(final String format)
  6. getNumberOfDays(String year, String month)
  7. getNumberStyleAsInt(String style)
  8. getOneFractionDigitNumberFormat()
  9. getPriceFormat()