Class TimeUtil

java.lang.Object
de.presti.ree6.utils.others.TimeUtil

public class TimeUtil extends Object
Utility class for the Time.
  • Method Details

    • getDifferenceBetween

      public static Period getDifferenceBetween(LocalDateTime start, LocalDateTime end)
      Get the difference between the two given LocalDateTime.
      Parameters:
      start - The start LocalDateTime.
      end - The end LocalDateTime.
      Returns:
      The difference between the two given LocalDateTime.
    • getFormattedDate

      public static String getFormattedDate(Period period)
      Get a formatted String of a Time-period.
      Parameters:
      period - The Time-period.
      Returns:
      A formatted String of a Time-period.
    • getTimeinSec

      public static int getTimeinSec(long time)
      Get a specific time amount that is presented as milliseconds as seconds.
      Parameters:
      time - The time amount.
      Returns:
      The time amount as seconds.
    • getTimeinMin

      public static int getTimeinMin(int s)
      Get a specific time amount that is presented as seconds as minutes.
      Parameters:
      s - The time amount.
      Returns:
      The time amount as minutes.
    • getTime

      public static String getTime(long t)
      Get a formatted String of the difference between the given time and the current Time.
      Parameters:
      t - The time.
      Returns:
      A formatted String of the difference between the given time and the current Time.