ShardsUtil
Index
Constructors
constructor
Returns ShardsUtil
Methods
staticgetDate
Parameters
Name Type Default Description optionaldate null | string date to get in moment
Returns string | DateTime<boolean>
staticgetNextShard
Get the next occuring black/red shard from the given date;
Parameters
Name Type Default Description date DateTime<boolean> optionalshardType (black | red)[] The type of shard to get the next occuring shard for
Returns null | { duration: string; end: DateTime<boolean>; index: number; info: ShardInfo; start: DateTime<boolean> }
the shard details or null if no shard is found
staticgetNextShardFromNow
Get the next occuring shard from the given date
Parameters
Name Type Default Description optionalshardType (black | red)[] The type of shard to get the next occuring shard for
Returns { duration: string; end: DateTime<boolean>; index: number; info: ShardInfo; start: DateTime<boolean> }
an upcoming shard relative from now
duration: string
end: DateTime<boolean>
index: number
info: ShardInfo
start: DateTime<boolean>
staticgetStatus
Get all three shards status for a given date relative to the current time
Parameters
Name Type Default Description date DateTime<boolean> The date for which to get the status for
Returns ShardsCountdown[] | No Shard
staticgetSuffix
Returns suffix for a given number
Parameters
Name Type Default Description number number The number to get the suffix for
Returns string
staticshardsIndex
Returns shards index for a given date
Parameters
Name Type Default Description date DateTime<boolean> Returns { currentRealm: prairie | forest | valley | wasteland | vault; currentShard: C | b | A | a | B }
currentRealm: prairie | forest | valley | wasteland | vault
currentShard: C | b | A | a | B
shardsUtil
A class to handle shards and realms indexing.