Module:SBTE/doc

This is the SkyBlock Time Engine.

Terminology
In this document, the following terms are used:
 * "SBST", or "SkyBlock Standard Time", refers to the timezone in SkyBlock
 * "UTC", or "Coordinated Universal Time", refers to the timezone of UTC on Earth
 * "SkyBlock Epoch" refers to the time at which the SBST time is at 00:00. See more on SkyBlock Time
 * "Unix Epoch" refers to the time at which the UTC time is 1 January 1970, 00:00. See more on WP:Unix Time

Fundamental Theorems of SkyDate
This is the Fundamental Theorems of SkyDate seen in the code of the predecessor of this module.

API
Note that this minimal time engine does not have language feature, and __tostring only prints for debug purpose.

SkyDuration
A SkyDuration represents a duration. It can translate between SkyBlock Durations and UTC Durations.

Example call on constructor:

Each field of the constructor is optional:
 * locale - can be UTC (denoted by U or sbte.helpers.LOCALES.utc) or SBST (denoted by S or sbte.helpers.LOCALES.sbst) - default SBST
 * year/month/day/hour/minute/second - accepts a number - default 0

A SkyDuration has these setters:

A SkyDuration has these readable fields:

SkyDate
A SkyDate represents a specific point in time with the accuracy to a SkyBlock second. It can translate between SkyBlock Std Time (SBST) and Coordinated Universal Time (UTC).

Example call on constructor:

Each field of the constructor is optional:
 * locale - can be UTC (denoted by U or sbte.helpers.LOCALES.utc) or SBST (denoted by S or sbte.helpers.LOCALES.sbst) - default SBST
 * year/month/day/hour/minute/second - accepts a number - default: see table below

Therefore, for an exact, non-changing date representation, the year must be specified.

A SkyDate has these setters:

A SkyDate has these readable fields:

SkyDateAlpha
SkyDateAlpha is the same as SkyDate, except that its SkyBlock Epoch is shifted according to Alpha Hypixel Network.

Helpers
All value settings used by the module is exported in the helpers field.