Jogu Predictions

PublicAPI

JPAPI:DecodeDateString(dateString)

Splits a dateString into its year, month, day, hour and minute components.

Parameters

dateString
(string) The dateString to decode.

Return values

  1. year (number) The year component of the dateString.
  2. month (number) The month component of the dateString.
  3. day (number) The day component of the dateString.
  4. hour (number) The hour component of the dateString.
  5. minute (number) The minute component of the dateString.


JPAPI:EncodeDateString(year, month, day, hour, minute)

Returns a dateString representing the specified date/time.
Any argument not passed to the function will use the corresponding return value of CalendarGetDate/GetGameTime instead. Calling this with no arguments will return a dateString representing the current realm time.

Parameters

year
(number) The year component of the dateString.
month
(number) The month component of the dateString.
day
(number) The day component of the dateString.
hour
(number) The hour component of the dateString.
minute
(number) The minute component of the dateString.

Return value

dateString (string) The encoded dateString.


JPAPI:GetCurrentPrediction()

Returns the current prediction's itemID and the dateString of its last update time.
Returns nil, nil when there hasn't been an update yet.

Return values

  1. itemID (number) The itemID of the current prediction.
  2. lastUpdate (string) The dateString representing the time of the last update.


JPAPI:GetLastUpdateString()

Returns the time of the last update and how long ago that was as a human-readable string.
Suitable for displaying to the user.

Return value

lastUpdate (string) The time of the last update.


JPAPI:StringToTime(dateString)

Returns the time represented by a dateString as a single integer (compatible with the standard date/time functions).

Parameters

dateString
(string) The dateString to decode.

Return value

time (number) The time represented by the dateString.


JPAPI

VERSION
The current version of Jogu Predictions


You must login to post a comment. Don't have an account? Register to get one!