Class DurationUtil

java.lang.Object
ch.tocco.nice2.types.api.DurationUtil

public abstract class DurationUtil extends Object
Utility methods for dealing with durations (time ranges).

May get replaced with JodaTime or Java7 somewhen.

  • Method Details

    • parseDuration

      @Nullable public static @Nullable Long parseDuration(String s)
      Parses a duration string into a long.
      Parameters:
      s - eg "-23:45:59.123" or "23:45".
      Returns:
      The duration as long, or null if no valid duration syntax.