DurationUtils extension
Extension of the Duration class.
- on
Methods
-
divideBy(
Duration other) → int -
Available on Duration, provided by the DurationUtils extension
Divides a Duration by another Duration. -
format(
) → List< int> -
Available on Duration, provided by the DurationUtils extension
Segments a duration by hours, minutes and seconds. -
prettyPrint(
) → String -
Available on Duration, provided by the DurationUtils extension
Prints a Duration with the format {h:mm}. Ex: 1:10, 1, 1:05. -
toHMS(
) → String -
Available on Duration, provided by the DurationUtils extension
Prints a Duration with the format {hh:mm:ss}.
Operators
-
operator +(
Duration other) → Duration -
Available on Duration, provided by the DurationUtils extension
Returns the sum of two Duration. -
operator -(
Duration other) → Duration -
Available on Duration, provided by the DurationUtils extension
Returns the difference between two Duration. -
operator /(
int other) → Duration -
Available on Duration, provided by the DurationUtils extension
Override the / operator to divide a Duration by an int.
Static Methods
-
fromString(
String s) → Duration -
Available on Duration, provided by the DurationUtils extension
Creates a Duration from a string.