works.iterative.core

Members list

Type members

Classlikes

object Moment extends MomentPlatform

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
Moment.type

JS side of the Moment companion: the Date built-ins as the engine behind parse/format. Input reaching parseCanonicalIso has already passed the shared syntactic guard, so Date.parse only ever sees a spec-defined ISO string and its implementation-defined leniency never applies.

JS side of the Moment companion: the Date built-ins as the engine behind parse/format. Input reaching parseCanonicalIso has already passed the shared syntactic guard, so Date.parse only ever sees a spec-defined ISO string and its implementation-defined leniency never applies.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Moment

Types

opaque type Moment

A moment in time, represented as epoch milliseconds (UTC)

A moment in time, represented as epoch milliseconds (UTC)

Why not to use Instant by itself? Well, the time representation might change for some reason, or might be different in different contexts (Like ScalaJS or Native). Better to abstract it away.

The representation is an epoch-millisecond Long on every platform; parsing and formatting delegate to the platform engine (java.time on JVM, the Date built-ins on JS) behind a shared syntactic guard, so the platforms accept and reject the same inputs.

Attributes