Class VersionInfo

Hierarchy

  • VersionInfo

Methods

  • Create a version from an encoded integer.

    Example

    const version = VersionInfo.from(50532300);

    console.log(version.toString()); // => 2021.4.25

    Parameters

    • version: number

      The integer.

    Returns VersionInfo

  • Create a version from a formatted string.

    Example

    const version = VersionInfo.from("2021.4.25s");

    console.log(version.toString()); // => 2021.4.25

    Parameters

    • version: string

      The formatted string.

    Returns VersionInfo

  • Parameters

    • version: string | number

    Returns VersionInfo

  • Parameters

    Returns void

  • Encode the version as an integer.

    Returns

    The version as an integer.

    Example

    const version = new VersionInfo(2021, 4, 2);

    console.log(version.encode()); // => 50532300

    Returns number

  • Convert the version into a human-readable string format.

    Returns

    The version as a string.

    Example

    const version = new VersionInfo(2021, 4, 2);

    console.log(version.toString()); // => 2021.4.25

    Returns string

Constructors

  • Parameters

    • year: number
    • month: number
    • day: number
    • Optional revision: number

    Returns VersionInfo

Properties

day: number

The day that the version was released.

month: number

The month that the version was released.

revision: number

The revision/build of the version.

year: number

The year that the version was released.

Generated using TypeDoc