Ext.data.JsonP.Ext_Version({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"

Files

A utility class that wrap around a string version number and provide convenient\nmethod to perform comparison. See also: compare. Example:

\n\n
var version = new Ext.Version('1.0.2beta');\nconsole.log(\"Version is \" + version); // Version is 1.0.2beta\n\nconsole.log(version.getMajor()); // 1\nconsole.log(version.getMinor()); // 0\nconsole.log(version.getPatch()); // 2\nconsole.log(version.getBuild()); // 0\nconsole.log(version.getRelease()); // beta\n\nconsole.log(version.isGreaterThan('1.0.1')); // True\nconsole.log(version.isGreaterThan('1.0.2alpha')); // True\nconsole.log(version.isGreaterThan('1.0.2RC')); // False\nconsole.log(version.isGreaterThan('1.0.2')); // False\nconsole.log(version.isLessThan('1.0.2')); // True\n\nconsole.log(version.match(1.0)); // True\nconsole.log(version.match('1.0.2')); // True\n
\n

Methods

Defined By

Instance Methods

Ext.Version
view source
new( version ) : Ext.Version
...
\n

Parameters

  • version : String/Number

    The version number in the following standard format:

    \n\n
    major[.minor[.patch[.build[release]]]]\n
    \n\n

    Examples:

    \n\n
    1.0\n1.2.3beta\n1.2.3.4RC\n
    \n

Returns

Ext.Version
view source
( target ) : Boolean
Returns whether this version equals to the supplied argument ...

Returns whether this version equals to the supplied argument

\n

Parameters

Returns

  • Boolean

    True if this version equals to the target, false otherwise

    \n
Ext.Version
view source
( ) : Number
Returns the build component value ...

Returns the build component value

\n

Returns

Ext.Version
view source
( ) : Number
Returns the major component value ...

Returns the major component value

\n

Returns

Ext.Version
view source
( ) : Number
Returns the minor component value ...

Returns the minor component value

\n

Returns

Ext.Version
view source
( ) : Number
Returns the patch component value ...

Returns the patch component value

\n

Returns

Returns the release component value ...

Returns the release component value

\n

Returns

Returns shortVersion version without dots and release ...

Returns shortVersion version without dots and release

\n

Returns

Ext.Version
view source
( target ) : Boolean
Convenient alias to isGreaterThan ...

Convenient alias to isGreaterThan

\n

Parameters

Returns

Ext.Version
view source
( target ) : Boolean
Convenient alias to isGreaterThanOrEqual ...

Convenient alias to isGreaterThanOrEqual

\n

Parameters

Returns

Ext.Version
view source
( target ) : Boolean
Returns whether this version if greater than the supplied argument ...

Returns whether this version if greater than the supplied argument

\n

Parameters

Returns

  • Boolean

    True if this version if greater than the target, false otherwise

    \n
Returns whether this version if greater than or equal to the supplied argument ...

Returns whether this version if greater than or equal to the supplied argument

\n

Parameters

Returns

  • Boolean

    True if this version if greater than or equal to the target, false otherwise

    \n
Ext.Version
view source
( target ) : Boolean
Returns whether this version if smaller than the supplied argument ...

Returns whether this version if smaller than the supplied argument

\n

Parameters

Returns

  • Boolean

    True if this version if smaller than the target, false otherwise

    \n
Ext.Version
view source
( target ) : Boolean
Returns whether this version if less than or equal to the supplied argument ...

Returns whether this version if less than or equal to the supplied argument

\n

Parameters

Returns

  • Boolean

    True if this version if less than or equal to the target, false otherwise

    \n
Ext.Version
view source
( target ) : Boolean
Convenient alias to isLessThan ...

Convenient alias to isLessThan

\n

Parameters

Returns

Ext.Version
view source
( target ) : Boolean
Convenient alias to isLessThanOrEqual ...

Convenient alias to isLessThanOrEqual

\n

Parameters

Returns

Ext.Version
view source
( target ) : Boolean
Returns whether this version matches the supplied argument. ...

Returns whether this version matches the supplied argument. Example:

\n\n
var version = new Ext.Version('1.0.2beta');\nconsole.log(version.match(1)); // True\nconsole.log(version.match(1.0)); // True\nconsole.log(version.match('1.0.2')); // True\nconsole.log(version.match('1.0.2RC')); // False\n
\n

Parameters

Returns

  • Boolean

    True if this version matches the target, false otherwise

    \n
Ext.Version
view source
( ) : Number[]
Returns this format: [major, minor, patch, build, release]. ...

Returns this format: [major, minor, patch, build, release]. Useful for comparison

\n

Returns

Ext.Version
view source
( ) : Stringprivate
Override the native toString method ...

Override the native toString method

\n

Returns

Ext.Version
view source
( ) : Stringprivate
Override the native valueOf method ...

Override the native valueOf method

\n

Returns

Defined By

Static Methods

Ext.Version
view source
( current, target ) : Numberstatic
Compare 2 specified versions, starting from left to right. ...

Compare 2 specified versions, starting from left to right. If a part contains special version strings,\nthey are handled in the following order:\n'dev' < 'alpha' = 'a' < 'beta' = 'b' < 'RC' = 'rc' < '#' < 'pl' = 'p' < 'anything else'

\n

Parameters

  • current : String

    The current version to compare to

    \n
  • target : String

    The target version to compare to

    \n

Returns

  • Number

    Returns -1 if the current version is smaller than the target version, 1 if greater, and 0 if they're equivalent

    \n
Ext.Version
view source
( value ) : Objectstatic
Converts a version component to a comparable value ...

Converts a version component to a comparable value

\n

Parameters

  • value : Object

    The value to convert

    \n

Returns

","superclasses":[],"meta":{"author":["Jacky Nguyen "],"docauthor":["Jacky Nguyen "]},"requires":[],"html_meta":{"author":null,"docauthor":null},"statics":{"property":[],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.Version","meta":{"static":true},"name":"compare","id":"static-method-compare"},{"tagname":"method","owner":"Ext.Version","meta":{"static":true},"name":"getComponentValue","id":"static-method-getComponentValue"}],"event":[],"css_mixin":[]},"files":[{"href":"Version.html#Ext-Version","filename":"Version.js"}],"linenr":5,"members":{"property":[],"cfg":[],"css_var":[],"method":[{"tagname":"method","owner":"Ext.Version","meta":{},"name":"constructor","id":"method-constructor"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"equals","id":"method-equals"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"getBuild","id":"method-getBuild"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"getMajor","id":"method-getMajor"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"getMinor","id":"method-getMinor"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"getPatch","id":"method-getPatch"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"getRelease","id":"method-getRelease"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"getShortVersion","id":"method-getShortVersion"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"gt","id":"method-gt"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"gtEq","id":"method-gtEq"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"isGreaterThan","id":"method-isGreaterThan"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"isGreaterThanOrEqual","id":"method-isGreaterThanOrEqual"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"isLessThan","id":"method-isLessThan"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"isLessThanOrEqual","id":"method-isLessThanOrEqual"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"lt","id":"method-lt"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"ltEq","id":"method-ltEq"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"match","id":"method-match"},{"tagname":"method","owner":"Ext.Version","meta":{},"name":"toArray","id":"method-toArray"},{"tagname":"method","owner":"Ext.Version","meta":{"private":true},"name":"toString","id":"method-toString"},{"tagname":"method","owner":"Ext.Version","meta":{"private":true},"name":"valueOf","id":"method-valueOf"}],"event":[],"css_mixin":[]},"inheritable":null,"private":null,"component":false,"name":"Ext.Version","singleton":false,"override":null,"inheritdoc":null,"id":"class-Ext.Version","mixins":[],"mixedInto":[]});