Skip to main content

Class: Duration

duration/src.Duration

Constructors

constructor

new Duration(pattern)

Parameters

NameTypeDescription
patternstring

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:64

Properties

offset

offset: number

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:58


kAanRegex

Static Private Readonly kAanRegex: RegExp

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:96


kCommaRegex

Static Private Readonly kCommaRegex: RegExp

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:91


kPatternRegex

Static Private Readonly kPatternRegex: RegExp

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:86

Accessors

fromNow

get fromNow(): Date

Returns

Date

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:71

Methods

dateFrom

dateFrom(date): Date

Parameters

NameTypeDescription
dateDate

Returns

Date

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:79


parse

Static Private parse(pattern): number

Parameters

NameTypeDescription
patternstring

Returns

number

Defined in

projects/utilities/packages/duration/src/lib/Duration.ts:102