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:63

Properties

offset

offset: number

Defined in

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


kAanRegex

Static Private Readonly kAanRegex: RegExp

Defined in

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


kCommaRegex

Static Private Readonly kCommaRegex: RegExp

Defined in

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


kPatternRegex

Static Private Readonly kPatternRegex: RegExp

Defined in

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

Accessors

fromNow

get fromNow(): Date

Returns

Date

Defined in

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

Methods

dateFrom

dateFrom(date): Date

Parameters

NameTypeDescription
dateDate

Returns

Date

Defined in

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


parse

Static Private parse(pattern): number

Parameters

NameTypeDescription
patternstring

Returns

number

Defined in

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