Time

opaque type Time

Time is an opaque Long value, holding milliseconds since start of 1970

Source
__.scala

Def

@scala.annotation.targetName("plus")
inline def +(inline l: Time.Length): Time
Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("plusAll")
inline def ++(inline s: ~[Time.Length]): Time
Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("minus")
inline def -(inline l: Time.Length): Time
Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("minusAll")
inline def --(inline s: ~[Time.Length]): Time
Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("less")
inline def <(inline v: A): Boolean

Less

Less

Returns true if current value is less than given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("lessOrEqual")
inline def <=(inline v: A): Boolean

Less or equal

Less or equal

Returns true if current value is less or equal to given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("range")
inline def <>(inline to: Long.G.<>[Time]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

Inherited from
zMethodsBase
Source
Ordered.scala
@scala.annotation.targetName("rangeX")
inline def <>>(inline to: Long.G.<>[Time]

Exclusive end range

Exclusive end range

Returns Range from current to given value exclusive

Note. Range uses base primitive natural ordering

Inherited from
zMethodsBase
Source
Ordered.scala
@scala.annotation.targetName("greater")
inline def >(inline v: A): Boolean

Greater

Greater

Returns true if current value is greater than given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("greaterOrEqual")
inline def >=(inline v: A): Boolean

Greater or equal

Greater or equal

Returns true if current value is greater or equal to given, false - otherwise

Inherited from
_methods
Source
Ordered.scala
@scala.annotation.targetName("age")

Length to current.

Length to current.

Returns Length from this time to current time.

If this is in future, void Length is returned.

Inherited from
Base
Source
Base.scala
inline def atLeast(v: Time

Max

Max

Returns maximum of current or given value

Inherited from
zMethodsBase
Source
Ordered.scala
inline def atMost(v: Time

Min

Min

Returns minimun of current or given value

Inherited from
zMethodsBase
Source
Ordered.scala
override def day: Day

Day.

Day.

Day, which includes this time instance.

Definition Classes
Source
__.scala
inline def daysTotal: Long

Day count

Day count

Total days (24.Hours) which fit in this time unit

Inherited from
_methods
Source
Millis.scala
override def dayTime: DayTime

DayTime component.

DayTime component.

DayTime component of this time instance.

Definition Classes
Source
__.scala
def format(pattern: String): String

Format

Format

Formats time with given pattern

See java.text.SimpleDateFormat for details

 val t: Time = \/

 t.format("hh 'o`clock' a, z z z z") tp        // Prints: 07 o'clock PM, Eastern Standard Time

 t.format("yyyy.MM.dd G 'at' HH:mm:ss z") tp // Prints: 1969.12.31 AD at 19:00:00 EST

 t.format("EEE, MMM d, `yy") tp             // Prints: Wed, Dec 31, '69

 t.format("h:mm a") tp                       // Prints: 7:00 PM
Source
__.scala
inline def hours: Long

Hours remainder

Hours remainder

Hours remainder when rounded by whole day (24 hours)

Value range is from 0 to 23

Inherited from
_methods
Source
Millis.scala
inline def hoursTotal: Long

Hours count

Hours count

Total hours which fit in this time unit

Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("isFuture")
def isFuture: Boolean

Check if in future.

Check if in future.

Returns true if this time is greater than current.

Inherited from
Base
Source
Base.scala
@scala.annotation.targetName("isPast")
def isPast: Boolean

Check if in past.

Check if in past.

Returns true if this time is less or equal to current.

Inherited from
Base
Source
Base.scala
@scala.annotation.targetName("lengthTo")

Range duration

Range duration

Returns Length between this and that.

Inherited from
Base
Source
Base.scala
inline def micros: Long

Microseconds remainder

Microseconds remainder

Microseconds remainder when rounded by whole millisecond

Value range is from 0 to 999

Inherited from
_methods
Source
Millis.scala
inline def microsTotal: Long

Microseconds count

Microseconds count

Total microseconds which fit in this time unit

Inherited from
_methods
Source
Millis.scala
inline def millis: Long

Milliseconds remainder

Milliseconds remainder

Milliseconds remainder when rounded by whole second

Value range is from 0 to 999

Inherited from
_methods
Source
Millis.scala
inline def millisTotal: Long
Source
__.scala
inline def minutes: Long

Minutes remainder

Minutes remainder

Minutes remainder when rounded by whole hour

Value range is from 0 to 59

Inherited from
_methods
Source
Millis.scala
inline def minutesTotal: Long

Minutes count

Minutes count

Total minutes which fit in this time unit

Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("month")
def month: Month

Month.

Month.

Month, which includes this time instance.

Inherited from
Base
Source
Base.scala
inline def nanos: Long

Nanoseconds remainder

Nanoseconds remainder

Nanoseconds remainder when rounded by whole microsecond

Value range is from 0 to 999

Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("nanosTotal")
def nanosTotal: Long

Nanoseconds count

Nanoseconds count

Total nanoseconds which fit in this time unit

Note: Maximum duration expressed in nanoseconds is "7331 days, 10 hours, 50 mins, 44.854775807 secs". Unboxed over will cause problems

Inherited from
_methods
Source
Millis.scala
inline def real: Long

Real value

Real value

Returns real value standing behind the opaque type

Inherited from
_methods
Source
__.scala
@scala.annotation.targetName("roundTo")
def roundTo(l: Time.Length)(using r: Rounding): Time
Inherited from
_methods
Source
Millis.scala
inline def seconds: Long

Seconds remainder

Seconds remainder

Seconds remainder when rounded by whole minute

Value range is from 0 to 59

Inherited from
_methods
Source
Millis.scala
inline def secondsTotal: Long

Seconds count

Seconds count

Total seconds which fit in this time unit

Inherited from
_methods
Source
Millis.scala
def skipTo(dt: DayTime): Time

Skip to next

Skip to next

Finds next greater instance of time with given DayTime

Note: The result may skip to next day

 val time = 2018.Year.start

 time tp                                   // Prints: 2018-01-01 0:00:00

 time.skipTo(16.Hours) tp                  // Prints: 2018-01-01 16:00:00

 time.skipTo(16.Hours).skipTo(10.Hours) tp // Prints: 2018-01-02 10:00:00
Source
__.scala
@scala.annotation.targetName("toBrief")
def toBrief: String

Short String.

Short String.

Time is rounded to 1.Second.

For current Day, day portion is ommited.

Inherited from
Base
Source
Base.scala
inline def toGmt: Time.Gmt

GMT Time

GMT Time

Built-in constructor to create Time.Gmt

Source
__.scala
@scala.annotation.targetName("week")
Inherited from
Base
Source
Base.scala
inline def weeksTotal: Long
Inherited from
_methods
Source
Millis.scala
@scala.annotation.targetName("year")
def year: Year

Year.

Year.

Year, which includes this time instance.

Inherited from
Base
Source
Base.scala

Implicit

implicit inline def implicitRequest(inline v: CURRENT): Time
Source
__.scala
implicit inline def implicitRequest(inline v: \/): Time
Source
__.scala