Class DurationUtils

java.lang.Object
overit.geocallapp.utilities.ux.ui.util.date.DurationUtils

public class DurationUtils extends Object
The class contains all the utility methods for formatting the duration.
Since:
19.0
  • Method Details

    • format

      public static String format(Long durationMinutes, Teacher teacher)
      Return a String that represents the given duration expressed in Days, Hours, Minutes
      Parameters:
      durationMinutes - the duration to format
      teacher - you may pass the teacher for translations.
      Returns:
      a String that represents the given duration expressed in Days, Hours, Minutes
    • format

      public static String format(Long durationMinutes, boolean showIfZero, Teacher teacher)
    • format

      public static String format(Long durationMinutes, boolean showIfZero, boolean showDays, Teacher teacher)
      Return a String that represents the given duration expressed in Days, Hours, Minutes
      Parameters:
      durationMinutes - the duration to format (in minutes)
      showIfZero - show zero if true, empty string if false
      showDays - show days if true
      teacher - you may pass the teacher for translations.
      Returns:
      a String that represents the given duration expressed in Days, Hours, Minutes