public Function getInternalFormatFunction()

in src/main/java/com/epam/parso/date/SasTimeFormat.java [221:240]


        public Function<Double, String> getInternalFormatFunction(int width, int precision) {
            return (sasSeconds) -> {
                BigDecimal hours = roundAdjustHours(sasSeconds, width, precision);

                if (precision > 0 && hours.longValue() == 0 && width - precision == 1) {
                    return hours.toString().substring(1);
                }

                String hh = hours.toString();
                if (width > 2 && hh.length() > width) {
                    hh = eNotation(hours, width);
                }

                if (hh == null || hh.length() > width) {
                    return "**";
                } else {
                    return hh;
                }
            };
        }