Package coop.intergal.ui.utils
Class FormattingUtils
- java.lang.Object
-
- coop.intergal.ui.utils.FormattingUtils
-
public class FormattingUtils extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringDECIMAL_ZEROstatic DateTimeFormatterFULL_DATE_FORMATTERFull date format.static DateTimeFormatterHOUR_FORMATTERFormats hours with am/pm.static DateTimeFormatterMONTH_AND_DAY_FORMATTER3 letter month name + day number E.g: Nov 20static DateTimeFormatterSHORT_DAY_FORMATTER3 letter day of the week + day number.static TemporalFieldWEEK_OF_YEAR_FIELDFor getting the week of the year from the local date.static DateTimeFormatterWEEKDAY_FULLNAME_FORMATTERFull day name.
-
Constructor Summary
Constructors Constructor Description FormattingUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringformatAs2Decimal(BigInteger valueInCents)static StringformatAsCurrency(int valueInCents)static StringgetFullMonthName(LocalDate date)Returns the month name of the date, according to the application locale.static DecimalFormatgetUiPriceFormatter()
-
-
-
Field Detail
-
DECIMAL_ZERO
public static final String DECIMAL_ZERO
- See Also:
- Constant Field Values
-
MONTH_AND_DAY_FORMATTER
public static final DateTimeFormatter MONTH_AND_DAY_FORMATTER
3 letter month name + day number E.g: Nov 20
-
WEEKDAY_FULLNAME_FORMATTER
public static final DateTimeFormatter WEEKDAY_FULLNAME_FORMATTER
Full day name. E.g: Monday.
-
WEEK_OF_YEAR_FIELD
public static final TemporalField WEEK_OF_YEAR_FIELD
For getting the week of the year from the local date.
-
SHORT_DAY_FORMATTER
public static final DateTimeFormatter SHORT_DAY_FORMATTER
3 letter day of the week + day number. E.g: Mon 20
-
FULL_DATE_FORMATTER
public static final DateTimeFormatter FULL_DATE_FORMATTER
Full date format. E.g: 03.03.2001
-
HOUR_FORMATTER
public static final DateTimeFormatter HOUR_FORMATTER
Formats hours with am/pm. E.g: 2:00 PM
-
-
Method Detail
-
getFullMonthName
public static String getFullMonthName(LocalDate date)
Returns the month name of the date, according to the application locale.- Parameters:
date-LocalDate- Returns:
- The full month name. E.g: November
-
formatAsCurrency
public static String formatAsCurrency(int valueInCents)
-
formatAs2Decimal
public static String formatAs2Decimal(BigInteger valueInCents)
-
getUiPriceFormatter
public static DecimalFormat getUiPriceFormatter()
-
-