Skip to main content

Class: Timestamp

timestamp/src.Timestamp

Constructors

constructor

new Timestamp(pattern)

Parameters

NameTypeDescription
patternstring

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:142

Properties

pattern

pattern: string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:130


template

Private template: TimestampTemplateEntry[]

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:135

Methods

display

display(time?): string

Parameters

NameTypeDescription
timeTimeResolvable

Returns

string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:152


displayUTC

displayUTC(time?): string

Parameters

NameTypeDescription
time?TimeResolvable

Returns

string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:161


edit

edit(pattern): Timestamp

Parameters

NameTypeDescription
patternstring

Returns

Timestamp

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:171


toString

toString(): string

Returns

string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:180


display

Static Private display(template, time): string

Parameters

NameTypeDescription
templateTimestampTemplateEntry[]
timestring | number | Date

Returns

string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:220


displayArbitrary

Static displayArbitrary(pattern, time?): string

Parameters

NameTypeDescription
patternstring
timeTimeResolvable

Returns

string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:190


displayUTCArbitrary

Static displayUTCArbitrary(pattern, time?): string

Parameters

NameTypeDescription
patternstring
timeTimeResolvable

Returns

string

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:200


parse

Static Private parse(pattern): TimestampTemplateEntry[]

Parameters

NameTypeDescription
patternstring

Returns

TimestampTemplateEntry[]

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:232


resolveDate

Static Private resolveDate(time): Date

Parameters

NameTypeDescription
timeTimeResolvable

Returns

Date

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:261


utc

Static utc(time?): Date

Parameters

NameTypeDescription
timestring | number | Date

Returns

Date

Defined in

projects/utilities/packages/timestamp/src/lib/Timestamp.ts:209