explicit constructor for a TimeSpan
Convert a Duration to a TimeSpan
Formats a number of millis to a string representing the number of weeks, days, hours, minutes, seconds, millis
time units and values used when converting a total number of millis to those units (see the format function)
Convert a DateTime to a TimeSpan
Convert a DateTime to a TimeSpan
(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.
Convert a Date to a TimeSpan
Convert a Date to a TimeSpan
(Since version 3.0.0) Date to TimeSpan conversion will be removed for possibility of mistakes in on-duration operations
Convert a Period to a TimeSpan
Convert a Period to a TimeSpan
(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.
Convert a TimeSpan to a Period
Convert a TimeSpan to a Period
(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.
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)