Time class final
Represents a quantity of time (duration).
- Inheritance
- Available extensions
- Annotations
-
- @immutable
Constructors
Properties
- asCentiseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Centiseconds (cs).no setter - asCenturies → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Centuries (c).no setter - asDays → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Days (d).no setter - asDecades → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Decades (dec).no setter - asDecaseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Decaseconds (das).no setter - asDeciseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Deciseconds (ds).no setter - asFortnights → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Fortnights (fn).no setter - asGigaseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Gigaseconds (Gs).no setter - asHectoseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Hectoseconds (hs).no setter - asHours → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Hours (h).no setter - asKiloseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Kiloseconds (ks).no setter - asMegaseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Megaseconds (Ms).no setter - asMicroseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Microseconds (μs).no setter - asMilliseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Milliseconds (ms).no setter - asMinutes → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Minutes (min).no setter - asMonths → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Months (mo).no setter - asNanoseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Nanoseconds (ns).no setter - asPicoseconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Picoseconds (ps).no setter - asSeconds → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Seconds (s).no setter - asWeeks → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Weeks (wk).no setter - asYears → Time
-
Available on Time, provided by the TimeValueGetters extension
Returns a Time representing this time in Years (yr).no setter - hashCode → int
-
Returns a hash code for this
Quantityinstance.no setterinherited - inCentiseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Centiseconds (cs).no setter - inCenturies → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Centuries (c).no setter - inDays → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Days (d).no setter - inDecades → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Decades (dec).no setter - inDecaseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Decaseconds (das).no setter - inDeciseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Deciseconds (ds).no setter - inFortnights → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Fortnights (fn).no setter - inGigaseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Gigaseconds (Gs).no setter - inHectoseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Hectoseconds (hs).no setter - inHours → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Hours (h).no setter - inKiloseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Kiloseconds (ks).no setter - inMegaseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Megaseconds (Ms).no setter - inMicroseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Microseconds (μs).no setter - inMilliseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Milliseconds (ms).no setter - inMinutes → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Minutes (min).no setter - inMonths → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Months (mo).no setter - inNanoseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Nanoseconds (ns).no setter - inPicoseconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Picoseconds (ps).no setter - inSeconds → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Seconds (s).no setter - inWeeks → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Weeks (wk).no setter - inYears → double
-
Available on Time, provided by the TimeValueGetters extension
Returns the time value in Years (yr).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → TimeUnit
-
Returns the unit of measurement associated with this quantity's original value.
no setterinherited
- value → double
-
Returns the numerical value of this quantity in its original unit.
no setterinherited
Methods
-
compareTo(
Quantity< TimeUnit> other) → int -
Compares this quantity to another Quantity of the same type (
T).inherited -
convertTo(
TimeUnit targetUnit) → Time -
Creates a new
Qinstance with the value converted totargetUnit.inherited -
create(
double value, TimeUnit unit) → Time -
Factory that creates a new instance of the concrete subtype
Q.override -
getValue(
TimeUnit targetUnit) → double -
Returns the value of this quantity converted to
targetUnit.inherited -
isEquivalentTo(
Quantity< TimeUnit> other, {double tolerance = 1e-9, double absoluteTolerance = 0.0}) → bool -
Checks if this quantity has the same physical magnitude as another,
accounting for IEEE 754 floating-point rounding inaccuracies.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ratioTo(
Quantity< TimeUnit> other) → double -
Computes the dimensionless ratio of this quantity to
other.inherited -
toString(
{TimeUnit? targetUnit, QuantityFormat format = QuantityFormat.invariant}) → String -
Returns a string representation of this quantity.
inherited
Operators
-
operator *(
double scalar) → Time -
Multiplies this quantity by a dimensionless
scalar.inherited -
operator +(
Time other) → Time -
Adds
otherto this quantity.inherited -
operator -(
Time other) → Time -
Subtracts
otherfrom this quantity.inherited -
operator /(
double scalar) → Time -
Divides this quantity by a dimensionless
scalar.inherited -
operator <(
Quantity< TimeUnit> other) → bool -
Checks if this quantity's magnitude is less than another's.
inherited
-
operator <=(
Quantity< TimeUnit> other) → bool -
Checks if this quantity's magnitude is less than or equal to another's.
inherited
-
operator ==(
Object other) → bool -
Determines whether this Quantity is equal to another Object.
inherited
-
operator >(
Quantity< TimeUnit> other) → bool -
Checks if this quantity's magnitude is greater than another's.
inherited
-
operator >=(
Quantity< TimeUnit> other) → bool -
Checks if this quantity's magnitude is greater than or equal to another's.
inherited
-
operator unary-(
) → Time -
Negates this quantity.
inherited
Static Properties
-
parser
→ QuantityParser<
TimeUnit, Time> -
The parser instance used to convert strings into Time objects.
final
Static Methods
-
parse(
String input, {List< QuantityFormat> formats = const [QuantityFormat.invariant]}) → Time - Parses a string representation of a time duration into a Time object.
-
tryParse(
String input, {List< QuantityFormat> formats = const [QuantityFormat.invariant]}) → Time? -
Attempts to parse a string representation of time. Returns
nullif parsing fails.