Class Timestring

java.lang.Object
tech.guilhermekaua.spigotboot.core.utils.Timestring

public class Timestring extends Object
A utility class for parsing durations
  • Constructor Details

    • Timestring

      public Timestring()
  • Method Details

    • duration

      public static double duration(String str, String format)
      convert `str` to ms
      Parameters:
      str - the string to parse
      format - the format to return
      Returns:
      the parsed value in the specified format
    • durationLong

      public static long durationLong(String str, String format)
      convert `str` to ms
      Parameters:
      str - the string to parse
      format - the format to return
      Returns:
      the parsed value in the specified format