UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

36 lines 1.34 kB
import { TinyType } from 'tiny-types'; import { inspect } from 'util'; import { Duration } from './Duration'; /** * Represents a point in time. * * `Timestamp` makes it easier for you to work with information related to time, like [Serenity/JS domain events](https://serenity-js.org/api/core-events/class/DomainEvent/). * * ## Learn more * - [`Duration`](https://serenity-js.org/api/core/class/Duration/) * - [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) * * @group Time */ export declare class Timestamp extends TinyType { readonly value: Date; static fromJSON(v: string): Timestamp; static fromTimestampInSeconds(value: number): Timestamp; static fromTimestampInMilliseconds(value: number): Timestamp; static now(): Timestamp; constructor(value?: Date); diff(another: Timestamp): Duration; plus(duration: Duration): Timestamp; less(duration: Duration): Timestamp; isBefore(another: Timestamp): boolean; isBeforeOrEqual(another: Timestamp): boolean; isAfter(another: Timestamp): boolean; isAfterOrEqual(another: Timestamp): boolean; toMilliseconds(): number; toSeconds(): number; toJSON(): string; toISOString(): string; toString(): string; [inspect.custom](): string; } //# sourceMappingURL=Timestamp.d.ts.map