Class FormatService

    • Method Detail

      • init

        public static IFormatService init()
        Inits format service.
        Returns:
        format service instance.
      • format

        public String format​(BigDecimal number)
        Description copied from interface: IFormatService
        Formats number with pure DecimalFormat with default ICU locale.
        Specified by:
        format in interface IFormatService
        Parameters:
        number - the number
        Returns:
        formatted number
      • format

        public String format​(BigDecimal number,
                             String formatString)
        Description copied from interface: IFormatService
        Formats number with format based on DecimalFormat with default ICU locale and additional settings in selected V8 format string.
        Specified by:
        format in interface IFormatService
        Parameters:
        number - the number
        Returns:
        formatted number
      • format

        public String format​(BigDecimal number,
                             com.ibm.icu.util.ULocale locale)
        Description copied from interface: IFormatService
        Formats number with pure DecimalFormat with selected ICU locale.
        Specified by:
        format in interface IFormatService
        Parameters:
        number - the number
        locale - the locale
        Returns:
        formatted number
      • format

        public String format​(boolean trueFalse)
        Description copied from interface: IFormatService
        Formats boolean value with com._1c.g5.v8.dt.core.format.impl.BooleanFormat with default ICU locale.
        Specified by:
        format in interface IFormatService
        Parameters:
        trueFalse - the boolean
        Returns:
        formatted boolean
      • format

        public String format​(boolean trueFalse,
                             String formatString)
        Description copied from interface: IFormatService
        Formats boolean value with format based on com._1c.g5.v8.dt.core.format.impl.BooleanFormat with default ICU locale and additional settings in selected V8 format string.
        Specified by:
        format in interface IFormatService
        Parameters:
        trueFalse - the boolean
        Returns:
        formatted boolean
      • format

        public String format​(boolean trueFalse,
                             com.ibm.icu.util.ULocale locale)
        Description copied from interface: IFormatService
        Formats boolean value with com._1c.g5.v8.dt.core.format.impl.BooleanFormat with selected ICU locale.
        Specified by:
        format in interface IFormatService
        Parameters:
        trueFalse - the boolean
        locale - the locale
        Returns:
        formatted boolean
      • format

        public String format​(Date dateTime)
        Description copied from interface: IFormatService
        Formats date and time with adjusted SimpleDateFormat with default ICU locale (yy -> yyyy).
        Specified by:
        format in interface IFormatService
        Parameters:
        dateTime - the date and time
        Returns:
        formatted date and time
      • format

        public String format​(Date dateTime,
                             String formatString)
        Description copied from interface: IFormatService
        Formats date and time with format based on adjusted com._1c.g5.v8.dt.core.format.impl.BooleanFormat with default ICU locale and additional settings in selected V8 format string.
        Specified by:
        format in interface IFormatService
        Parameters:
        dateTime - the date and time
        Returns:
        formatted date and time
      • format

        public String format​(Date dateTime,
                             com.ibm.icu.util.ULocale locale)
        Description copied from interface: IFormatService
        Formats date and time with adjusted SimpleDateFormat with selected ICU locale (yy -> yyyy).
        Specified by:
        format in interface IFormatService
        Parameters:
        dateTime - the date and time
        locale - the locale
        Returns:
        formatted date and time
      • getNumberAndDateLocale

        public com.ibm.icu.util.ULocale getNumberAndDateLocale()
        Description copied from interface: IFormatService
        Gets number and date format locale. By default is system locale, but may be specified in command line arg '/VL'.
        Specified by:
        getNumberAndDateLocale in interface IFormatService
        Returns:
        number and date format locale
      • getResourcesLocale

        public com.ibm.icu.util.ULocale getResourcesLocale()
        Description copied from interface: IFormatService
        Gets resources locale. By default is system locale? but may be specified in command line arg '/L'
        Specified by:
        getResourcesLocale in interface IFormatService
        Returns:
        resources locale