Timestamp
Extends:
TinyType → Timestamp
Tests:
- Timestamp
- Timestamp instantiation can be instantiated with an arbitrary Date
- Timestamp instantiation defaults to current time if no argument is provided
- Timestamp serialisation is serialised to an ISO-8601-compliant string
- Timestamp serialisation can be deserialised from an ISO-8601-compliant string
- Timestamp arithmetic allows for calculating a difference between two timestamps
- Timestamp arithmetic allows for computing another timestamp, relative to the original one
- Timestamp conversion can be converted to a numeric unix timestamp
- Timestamp conversion can be created from a numeric unix timestamp
Static Method Summary
Static Public Methods | ||
public static |
|
|
public static |
fromMillisecondTimestamp(v: number): Timestamp |
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
|
|
public |
|
|
public |
|
|
public |
toJSON(): string |
|
public |
toMillisecondTimestamp(): number |
|
public |
toString(): string |
Static Public Methods
Public Constructors
public constructor() source
Public Methods
public diff(another: Timestamp): Duration source
Params:
Name | Type | Attribute | Description |
another | Timestamp |
public less(duration: Duration): Timestamp source
Params:
Name | Type | Attribute | Description |
duration | Duration |