## DuVersion(versionopt)

Informations about the version of an application.
The version is in the form: Major.Minor.Patch#Build. Example: `17.0.0x557` or `17.0.0-Alpha1` or `17.4`
The only required part is the Major version.
Constructor

#### # new DuVersion(versionopt)

Constructs a new version object

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`version` | `string` | <optional> | '1.0.0' | The version in the form Major.Minor.Patch

##### Properties:

Name | Type | Description
--- | --- | ---
`fullVersion` | `string` | The complete version name
`versionString` | `string` | The Major.Minor part as a string
`version` | `float` | The Major.Minor part as a float
`major` | `int` |
`minor` | `int` |
`patch` | `int` |
`build` | `int` | The build is -1 if it cannot be parsed as an int, like "alpha".
`buildString` | `string` | The build as a string

View Source Duik_api_fordoc.jsxinc, line 5556

# Methods

#### # static compare(vA, vBopt) → {boolean}

Compares two versions of an application

##### Parameters:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`vA` | `string` | `DuVersion` |  |  | The first version
`vB` | `string` | `DuVersion` | <optional> | DuESF.scriptVersion | The other version

View Source Duik_api_fordoc.jsxinc, line 5659

Returns:
True if vA is more recent than vB (strict, if they're equal it will return false)
Type: `boolean`

#### # atLeast(otherVersion) → {bool}

Checks if this version is higher than or equals another.

##### Parameters:

Name | Type | Description
--- | --- | ---
`otherVersion` | `DuVersion` | `string` | The version to compare with.

View Source Duik_api_fordoc.jsxinc, line 5632

Returns:
true if this version is more recent than or the same as otherVersion
Type: `bool`

#### # equals(otherVersion) → {bool}

Checks if this version is the same as another.

##### Parameters:

Name | Type | Description
--- | --- | ---
`otherVersion` | `DuVersion` | `string` | The version to compare with.

View Source Duik_api_fordoc.jsxinc, line 5644

Returns:
true if this version is the same
Type: `bool`

#### # higherThan(otherVersion) → {bool}

Checks if this version is higher than another.

##### Parameters:

Name | Type | Description
--- | --- | ---
`otherVersion` | `DuVersion` | `string` | The version to compare with.

View Source Duik_api_fordoc.jsxinc, line 5621

Returns:
true if this version is more recent than otherVersion
Type: `bool`

# Type Definitions

Type: `Object`

#### # UpdateReply

Information got from an update query on a RxVersion server, as returned by `DuVersion.checkUpdate()`.

##### Properties:

Name | Type | Description
--- | --- | ---
`update` | `Boolean` | Whether this script needs an update.
`version` | `string` | The available version.
`name` | `string` | The name of the script.
`description` | `string` | A description of the version.
`downloadURL` | `string` | The link to download the current version.
`changelogURL` | `string` | The link to the changelog.
`donateURL` | `string` | The link to make a donation.
`date` | `string` | The date of the version, in the form "yyyy-MM-dd hh:mm:ss".
`message` | `string` | Information about success/errors.
`success` | `Boolean` | false if the query failed and the version could not be retrieved.
`accepted` | `Boolean` | false if the query was wrong or the server did not recognize it. Should always be true. /** Checks if a new version is available for the current script, using the DuESF.rxVersionURL if it is set.

View Source Duik_api_fordoc.jsxinc, line 5726