Classes
Methods
# (static) compare(t1, t2) → {number}
Compares two TimeSpan values, returning an integer that indicates their relationship.
- Type
- number
# (static) equals(t1, t2) → {Boolean}
Returns a value indicating whether two instances of TimeSpan are equal.
true if value is a TimeSpan object that represents the same time interval as the current TimeSpan object; otherwise, false.
- Type
- Boolean
# (static) fromDays(value) → {TimeSpan}
Returns a TimeSpan that represents a specified number of days, where the specification is accurate to the nearest millisecond.
Name | Type | Description |
---|---|---|
value |
number | number of days |
An object that represents value.
- Type
- TimeSpan
# (static) fromHours(value) → {TimeSpan}
Returns a TimeSpan that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
Name | Type | Description |
---|---|---|
value |
number | number of hours |
An object that represents value.
- Type
- TimeSpan
# (static) fromMilliseconds(value) → {TimeSpan}
Returns a TimeSpan that represents a specified number of milliseconds.
Name | Type | Description |
---|---|---|
value |
number | number of milli seconds |
An object that represents value
- Type
- TimeSpan
# (static) fromMinutes(value) → {TimeSpan}
Returns a TimeSpan that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
Name | Type | Description |
---|---|---|
value |
number | number of minutes |
An object that represents value.
- Type
- TimeSpan
# (static) fromSeconds(value) → {TimeSpan}
Returns a TimeSpan that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
Name | Type | Description |
---|---|---|
value |
number | number of seconds |
An object that represents value.
- Type
- TimeSpan
# (static) fromTicks(value) → {TimeSpan}
Returns a TimeSpan that represents a specified time, where the specification is in units of ticks.
Name | Type | Description |
---|---|---|
value |
number | of ticks |
An object that represents value.
- Type
- TimeSpan
# (static) opAddition(t1, t2) → {TimeSpan}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
TimeSpan Class Object
- Type
- TimeSpan
# (static) opEquality(t1, t2) → {Boolean}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
- Type
- Boolean
# (static) opGreaterThan(t1, t2) → {Boolean}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
- Type
- Boolean
# (static) opGreaterThanOrEqual(t1, t2) → {Boolean}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
- Type
- Boolean
# (static) opInequality(t1, t2) → {Boolean}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
- Type
- Boolean
# (static) opLessThan(t1, t2) → {Boolean}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
- Type
- Boolean
# (static) opLessThanOrEqual(t1, t2) → {Boolean}
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
- Type
- Boolean
# (static) opSubtraction(t1, t2) → {TimeSpan}
Returns a new TimeSpan object whose value is the difference between the two specified TimeSpan object
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan Class Object |
t2 |
TimeSpan | TimeSpan Class Object |
A new time interval whose value is the result of the value of the two instances of ts
- Type
- TimeSpan
# (static) opUnaryNegation(t) → {TimeSpan}
Returns a new TimeSpan object whose value is the negated value of this instance.
Name | Type | Description |
---|---|---|
t |
TimeSpan | TimeSpan Class Object |
A new object with the same numeric value as this instance, but with the opposite sign.
- Type
- TimeSpan
# (static) opUnaryPlus(t) → {TimeSpan}
Returns a new TimeSpan object whose value is the sum of the two specified TimeSpan object.
Name | Type | Description |
---|---|---|
t |
TimeSpan | TimeSpan Class Object |
A new time interval whose value is the result of the value of the two instances of ts
- Type
- TimeSpan
# (static) subtractDate(from, to) → {TimeSpan}
Name | Type | Description |
---|---|---|
from |
Date | date object |
to |
Date | data object |
- Type
- TimeSpan
# (static) timeToTicks(hour, minute, second) → {number}
Name | Type | Description |
---|---|---|
hour |
int | number of hours |
minute |
int | number of minutes |
second |
int | number of seconds |
- Type
- number
# add(t) → {TimeSpan}
Name | Type | Description |
---|---|---|
t |
TimeSpan | TimeSpan Class Object |
- Type
- TimeSpan
# compareTo(value) → {Number}
Name | Type | Description |
---|---|---|
value |
TimeSpan | TimeSpan Class Object |
- Type
- Number
# duration() → {TimeSpan}
TimeSpan Class Object
- Type
- TimeSpan
# getDays() → {Number}
njmber of days
- Type
- Number
# getHours() → {Number}
number of hours
- Type
- Number
# getMilliseconds() → {Number}
number of milli seconds
- Type
- Number
# getMinutes() → {Number}
number of minutes
- Type
- Number
# getSeconds() → {Number}
number of seconds
- Type
- Number
# getTotalDays() → {Number}
number of total days
- Type
- Number
# getTotalHours() → {Number}
number of total hours
- Type
- Number
# getTotalMilliseconds() → {Number}
number of total milliseconds
- Type
- Number
# getTotalMinutes() → {Number}
number of total minutes
- Type
- Number
# getTotalSeconds() → {Number}
number of total seconds
- Type
- Number
# subtract(ts) → {TimeSpan}
Name | Type | Description |
---|---|---|
ts |
TimeSpan | TimeSpan Class Object |
- Type
- TimeSpan
# toEquals(t1) → {Boolean}
Returns a value indicating whether two instances of TimeSpan are equal.
Name | Type | Description |
---|---|---|
t1 |
TimeSpan | TimeSpan value |
true if value is a TimeSpan object that represents the same time interval as the current TimeSpan structure; otherwise, false.
- Type
- Boolean