Class TimeUtil

java.lang.Object
com.plotsquared.core.util.TimeUtil

public final class TimeUtil extends Object
  • Method Details

    • secToTime

      public static @NonNull String secToTime(@org.checkerframework.checker.index.qual.NonNegative long time)
      Format seconds into a string with the format #y #w #d #h #s
      Parameters:
      time - Time to format
      Returns:
      Formatted string
    • timeToSec

      public static @org.checkerframework.checker.index.qual.NonNegative long timeToSec(@NonNull String string)
      Parse a time string back into time
      Parameters:
      string - String to parse
      Returns:
      Parsed time