public class ChatUtils extends Object
Modifier and Type | Field and Description |
---|---|
static long |
DAYS |
static DateTimeFormatter |
GENERIC_DATE_TIME_FORMATTER |
static long |
HOURS |
static long |
MINUTES |
static long |
MONTHS |
static long |
SECONDS |
static long |
WEEKS |
static long |
YEARS |
Constructor and Description |
---|
ChatUtils() |
Modifier and Type | Method and Description |
---|---|
static @Nullable String |
formatTime(long time) |
static String |
getFullTimeFromLong(long millis)
Get a visual for the current times.
|
static String |
getTimeFromLong(long millis)
Get the time to string but rounded at value.
|
static long |
parseDurationToSeconds(String duration)
Get the seconds corresponding to the duration
|
public static final DateTimeFormatter GENERIC_DATE_TIME_FORMATTER
public static final long YEARS
public static final long MONTHS
public static final long WEEKS
public static final long DAYS
public static final long HOURS
public static final long MINUTES
public static final long SECONDS
public static String getTimeFromLong(long millis)
millis
- the time in millisecondspublic static String getFullTimeFromLong(long millis)
millis
- the time to show in millisecondspublic static long parseDurationToSeconds(String duration)
duration
- Time in stringpublic static @Nullable String formatTime(long time)