javatime
Conversion methods between coulomb
types and java.time
types
Attributes
- Source
- time.scala
- Graph
-
- Supertypes
- Self type
-
javatime.type
Members list
Type members
Classlikes
Conversion typeclasses between coulomb
types and java.time
types
Conversion typeclasses between coulomb
types and java.time
types
Attributes
- Source
- time.scala
- Supertypes
- Self type
-
conversions.type
Extensions
Extensions
Convert a Duration
to a coulomb Quantity
using a truncating conversion
Convert a Duration
to a coulomb Quantity
using a truncating conversion
Type parameters
- U
-
the desired unit type
- V
-
the desired value type - integral
Attributes
- Returns
-
the quantity object equivalent to the Duration
- Example
-
val d: Duration = ... // convert to an integral quantity of seconds d.tToQuantity[Long, Second]
- Source
- time.scala
Convert a Duration
to a coulomb Quantity
Convert a Duration
to a coulomb Quantity
Type parameters
- U
-
the desired unit type
- V
-
the desired value type
Attributes
- Returns
-
the quantity object equivalent to the Duration
- Example
-
val d: Duration = ... // convert d to seconds d.toQuantity[Double, Second]
- Source
- time.scala
Convert an EpochTime value to a java.time Instant
Convert an EpochTime value to a java.time Instant
Attributes
- Returns
-
the equivalent Instant value
- Example
-
val e: EpochTime[Double, Hour] = ... // convert to an equivalent java.time Instant e.toInstant
- Source
- time.scala
Convert a java.time Instant to an EpochTime value using a truncating conversion
Convert a java.time Instant to an EpochTime value using a truncating conversion
Type parameters
- U
-
the desired unit type
- V
-
a desired integral value type
Attributes
- Returns
-
equivalent EpochTime value
- Example
-
val i: Instant = ... // convert i to an integer number of days from Jan 1, 1970 i.tToEpochTime[Long, Day]
- Source
- time.scala
Convert a java.time Instant to an EpochTime value
Convert a java.time Instant to an EpochTime value
Type parameters
- U
-
the desired unit type
- V
-
the desired value type
Attributes
- Returns
-
equivalent EpochTime value
- Example
-
val i: Instant = ... // convert i to days from Jan 1, 1970 i.toEpochTime[Double, Day]
- Source
- time.scala
Convert a coulomb Quantity to java.time.Duration
Convert a coulomb Quantity to java.time.Duration
Attributes
- Returns
-
a
Duration
equivalent to the originalQuantity
- Example
-
val q: Quantity[Double, Minute] = ... // convert to an equivalent Duration q.toDuration
- Source
- time.scala