01 /*
02 * Created on Aug 30, 2007
03 *
04 */
05 package com.x8ing.mc.bp;
06
07 import java.text.DecimalFormat;
08 import java.text.DecimalFormatSymbols;
09 import java.util.Locale;
10
11 /**
12 * @author Patrick Heusser
13 */
14 public class Constants {
15
16 public static final String GLOBAL_DATE_FORMAT = "yyyy.MM.dd";
17
18 private static final String GLOBAL_CURRENY_FORMAT = "+##,###,###.00;-##,###,###.00";
19
20 public static final boolean TRACE_DEBUG = false;
21
22 /**
23 * for swiss like formating even on engl locale machines.
24 */
25 public static DecimalFormat createCurrencyFormater() {
26
27 DecimalFormatSymbols symb = new DecimalFormatSymbols(Locale.GERMANY);
28 symb.setGroupingSeparator('\'');
29
30 DecimalFormat df = new DecimalFormat(GLOBAL_CURRENY_FORMAT, symb);
31
32 return df;
33
34 }
35 }
|