Time

Source
__.scala

Member

opaque type DayTime

Time within Day

DayTime is an opaque Long value holding nanoseconds since midnigth

Source
DayTime.scala
opaque type DayTime

Time within Day

DayTime is an opaque Long value holding nanoseconds since midnigth

Source
DayTime.scala
opaque type Gmt

Greenwich Mean Time

Time.Gmt is an opaque Long value same as Time, but not localized for printing

  val time = Time.current
  val gmt  = Time.Gmt.current

  time.dayTime.tagBrief.tp // Prints: 13:34

  gmt.dayTime.tagBrief.tp  // Prints: 17:34

  // Nevertheless they are data equal

  (time.real == gmt.real).tp       // Prints: true
Source
Gmt.scala
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
opaque type Length

Time.Length is an opaque Long value, holding total nanoseconds

Time.Length constructor methods are attached to primitives:

  1.Day.tp       // Prints: 1 day
  33.Millis.tp   // Prints: 0.033 sec
  10.Hours.tp    // Prints: 10 hours
  99999.Nanos.tp // Prints: 0.000099999 sec

Longest Time.Length possible is:

 Long.max.Nanos.tp  // Prints: 106751 days 23 hours 47 mins 16.854775807 secs
Source
Length.scala

Period is a custom Time range implementation

It does have few time specific methods, like '.length', '.dayStream', '.lastDay', which are not available in general range.

Source
Period.scala

Period is a custom Time range implementation

It does have few time specific methods, like '.length', '.dayStream', '.lastDay', which are not available in general range.

Source
Period.scala
object X

Type Extentions

This object contains all provided base type implementations

Source
__.scala
object Zone extends Able.Doc

Def

def apply(d: Day, l: Time.Length, ls: Time.Length*): Time
Source
__.scala
def apply(i: java.time.Instant): Time
Source
__.scala
def currentPro(changeEvery: Time.Length): Long.Pro.O
Source
__.scala
inline def fromIndex(epochMillis: Long): Time
Source
__.scala
@scala.annotation.threadUnsafe
final lazy val ordering: Ordering[Time]
Inherited from
Ordered
Source
Ordered.scala
val typeName: String

Type name

Type name

Returns defined opaque type name

Inherited from
OpaqueBase
Source
OpaqueBase.scala
def value_doc(v: Time): Doc

Value to Doc

Value to Doc

Override this method to provide type custom Doc implementation

Inherited from
Base
Source
Base.scala
override def value_isVoid(v: Time): Boolean

Void check

Void check

Override this method to define which instances of this type are void

By default this method always returns false

If type supports void instances, then following inmpelentation should be added in most cases:

 implicit inline def implicitRequest(v:VOID): OPAQUE_TYPE
Definition Classes
Base -> Long -> OpaqueBase -> Void
Source
__.scala
override def value_tag(v: Time): String

Value to String

Value to String

Override this method to provide type custom convertion to String

Definition Classes
Base -> OpaqueBase -> Tag
Source
__.scala

Containers

Specialized buffer

Specialized buffer

Already parameterized generic buffer

Inherited from
Containers
Source
Containers.scala

Specialized collection

Specialized collection

Already parameterized generic collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized functions

Specialized functions

Already parameterized set of generic functions

Inherited from
Containers
Source
Containers.scala

Specialized indexed collection

Specialized indexed collection

Already parameterized generic indexed collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala
type Lookup[B] = Long.G.Lookup[Time, B]

Specialized lookup collection

Specialized lookup collection

Already parameterized generic lookup collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized option

Specialized option

Already parameterized generic option

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized pack

Specialized pack

Already parameterized generic immutable collection

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized property

Specialized property

Already parameterized generic property

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Parameterized Val.Promise

Parameterized Val.Promise

Already parameterized generic Val.Promise

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized range

Specialized range

Already parameterized generic range

Inherited from
Containers
Source
Containers.scala

Parameterized Val.Result

Parameterized Val.Result

Already parameterized generic Val.Result

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Type alias

Type alias

Inherited from
Containers
Source
Containers.scala

Companion alias

Companion alias

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Specialized stream

Specialized stream

Already parameterized generic stream

Inherited from
Containers
Source
Containers.scala

Type companion

Type companion

Holds methods to construct type instances

Inherited from
Containers
Source
Containers.scala

Implicit

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