public class MiscUtil
extends java.lang.Object
Constructor and Description |
---|
MiscUtil() |
Modifier and Type | Method and Description |
---|---|
static java.time.OffsetDateTime |
getCreationTime(java.lang.Object entity)
Gets the creation-time of a JDA-entity by doing the reverse snowflake algorithm on its id.
|
static java.time.OffsetDateTime |
getCreationTime(java.lang.String entityId)
Gets the creation-time of a JDA-entity by doing the reverse snowflake algorithm on its id.
|
static java.lang.String |
getDateTimeString(java.time.OffsetDateTime time)
Returns a prettier String-representation of a OffsetDateTime object
|
public static java.time.OffsetDateTime getCreationTime(java.lang.String entityId)
entityId
- The id of the JDA entity where the creation-time should be determined forpublic static java.time.OffsetDateTime getCreationTime(java.lang.Object entity)
entity
- The JDA entity where the creation-time should be determined forpublic static java.lang.String getDateTimeString(java.time.OffsetDateTime time)
time
- The OffsetDateTime object to format