works.iterative.core
Members list
Type members
Classlikes
Attributes
- Supertypes
- 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 Objecttrait Matchableclass Any
- Known subtypes
-
object Moment
Types
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.