Class DurationUtils

java.lang.Object
org.hippoecm.frontend.util.DurationUtils

public class DurationUtils extends Object
  • Method Details

    • parse

      public static Duration parse(String durationAsString)

      Since Wicket 9, a Duration could no longer be constructed by the custom format specified in org.apache.wicket.util.time.Duration, e.g. "8 hours" or "5 seconds", but the class was still there as deprecated and the deprecated method was used as fallback in case of an error.

      In Wicket 10, the deprecated fallback was removed, and the custom format is no longer supported. All values must be written using the ISO-8601 duration format PnDTnHnMn.nS with days considered to be exactly 24 hours.

      Parameters:
      durationAsString - The duration formatted as a string.
      Returns:
      A new Duration based on the input string