object TimeSpan
The TimeSpan object provides class represents an amount of time. It can be translated to a date with the date method. In that case, the number of millis seconds will be used to create a Date object starting from the Epoch time (see the documentation for java.util.Date)
- Alphabetic
- By Inheritance
- TimeSpan
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(in: Long): (TimeHelpers.this)#TimeSpan
explicit constructor for a TimeSpan
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
implicit
def
durationToTS(in: Duration): (TimeHelpers.this)#TimeSpan
Convert a Duration to a TimeSpan
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
format(millis: Long): String
Formats a number of millis to a string representing the number of weeks, days, hours, minutes, seconds, millis
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
val
scales: List[(Long, String)]
time units and values used when converting a total number of millis to those units (see the format function)
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
implicit
def
dateTimeToTS(in: DateTime): (TimeHelpers.this)#TimeSpan
Convert a DateTime to a TimeSpan
Convert a DateTime to a TimeSpan
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Implicit conversion from DateTime to TimeSpan will be removed due to its unclear behavior; use new TimeSpan(dateTime.getMillis) instead.
-
implicit
def
dateToTS(in: Date): (TimeHelpers.this)#TimeSpan
Convert a Date to a TimeSpan
Convert a Date to a TimeSpan
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Date to TimeSpan conversion will be removed for possibility of mistakes in on-duration operations
-
implicit
def
periodToTS(in: Period): (TimeHelpers.this)#TimeSpan
Convert a Period to a TimeSpan
Convert a Period to a TimeSpan
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Implicit conversion from Period to TimeSpan will be removed due to its unclear behavior; use new Period(timeSpan.millis) instead.
-
implicit
def
tsToPeriod[TS](in: TS)(implicit arg0: (TS) ⇒ (TimeHelpers.this)#TimeSpan): Period
Convert a TimeSpan to a Period
Convert a TimeSpan to a Period
- Annotations
- @deprecated
- Deprecated
(Since version 3.0.0) Implicit conversion from TimeSpan to Period will be removed due to its unclear behavior; use new TimeSpan(period.toDurationFrom(startDateTime)) instead.