Time.Instant

opaque type Instant

Time.Instant is an opaque Long value, holding nanoseconds since start of 1970

General timing in scalqa is done with millisecond precision and it is sufficient for most scenarios.

Occasionally, however, nanosecond precision is required, and Time.Instant fills the gap:

    val t : Time    = CURRRENT
    val i : Instant = CURRRENT

    t.tp   // Printed: 2021-01-21 09:36:31.761

    i.tp   // Printed: 2021-01-21 09:36:31.766.000.000

Note. Time.Instant is limited to range of years from 1677 to 2260

Source
Instant.scala

Def

@targetName("plus")
inline def +(l: Time.Length): Time.Instant
@targetName("minus")
inline def -(l: Time.Length): Time.Instant
@targetName("less")
inline def <(v: Time.Instant): Boolean

Less

Less

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

Inherited from
_methods
Source
Ordered.scala
@targetName("lessOrEqual")
inline def <=(v: Time.Instant): 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
@targetName("range")
inline def <>(to: Long.G.Range[Time.Instant]

Range

Range

Returns Range from current to given value

Note. Range uses base primitive natural ordering

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

Exclusive end range

Exclusive end range

Returns Range from current to given value exclusive

Note. Range uses base primitive natural ordering

Inherited from
z_MethodsBase
Source
Ordered.scala
@targetName("greater")
inline def >(v: Time.Instant): Boolean

Greater

Greater

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

Inherited from
_methods
Source
Ordered.scala
@targetName("greaterOrEqual")
inline def >=(v: Time.Instant): 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
@targetName("Opt")

To option

To option

Returns Long specialized option

Inherited from
_methods
Source
Base.scala
def day: Day

Day.

Day.

Day, which includes this time instance.

Inherited from
Base
Source
Base.scala

DayTime component.

DayTime component.

DayTime component of this time instance.

Inherited from
Base
Source
Base.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
Base
Source
Nanos.scala
def isDayStart: Boolean
Inherited from
Base
Source
Base.scala
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
def isMonthStart: Boolean
Inherited from
Base
Source
Base.scala
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
def isYearStart: Boolean
Inherited from
Base
Source
Base.scala
inline def max(v:

Max value

Max value

Returns maximum of current or given value

Inherited from
z_MethodsBase
Source
Ordered.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
Base
Source
Nanos.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
Base
Source
Nanos.scala
inline def min(v:

Min value

Min value

Returns minimun of current or given value

Inherited from
z_MethodsBase
Source
Ordered.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
Base
Source
Nanos.scala
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
Base
Source
Nanos.scala
inline def real: Long

Real value

Real value

Returns Long value standing behind the opaque type.

This is a zero cost call.

Inherited from
_methods
Source
Base.scala
inline def roundTo(l: Time.Length)(using r: Math.Rounding): Time.Instant
Inherited from
Base
Source
Nanos.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
Base
Source
Nanos.scala
def tagBrief: String

Short String.

Short String.

Time is rounded to 1.Second.

For current Day, day portion is ommited.

Inherited from
Base
Source
Base.scala
def week: Week
Inherited from
Base
Source
Base.scala
def year: Year

Year.

Year.

Year, which includes this time instance.

Inherited from
Base
Source
Base.scala