package org.silverpeas.components.scheduleevent.view;

import java.text.NumberFormat;

public class ScheduleEventRessources {

  private ScheduleEventRessources() {
  }

  private static final int PERCENT_FORMAT_DIGITS_PRECISION = 1;

  public static String formatInPercent(double rate) {
    NumberFormat percent = NumberFormat.getPercentInstance();
    percent.setMaximumFractionDigits(PERCENT_FORMAT_DIGITS_PRECISION);
    return percent.format(rate);
  }
}
