Class FormattingUtils


  • public class FormattingUtils
    extends Object
    • Field Detail

      • 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
    • Constructor Detail

      • FormattingUtils

        public FormattingUtils()
    • 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()