This is documentation for Stream Chat Angular SDK v4, which is nolonger actively maintained. For up-to-date documentation, see the latest version (v5).

DateParserService

The DateParserService parses dates into user-friendly string representations.

Properties

customDateParser

Optional customDateParser: (date: Date) => string

Type declaration

▸ (date): string

Custom parser to override parseDate

Parameters
NameType
dateDate
Returns

string

Defined in

lib/date-parser.service.ts:18


customDateTimeParser

Optional customDateTimeParser: (date: Date) => string

Type declaration

▸ (date): string

Custom parser to override parseDateTime

Parameters
NameType
dateDate
Returns

string

Defined in

lib/date-parser.service.ts:22


customTimeParser

Optional customTimeParser: (date: Date) => string

Type declaration

▸ (date): string

Custom parser to override parseTime

Parameters
NameType
dateDate
Returns

string

Defined in

lib/date-parser.service.ts:14

Methods

parseDate

parseDate(date): string

Return a user-friendly string representation of the date (year, month and date)

Parameters

NameType
dateDate

Returns

string

The parsed date

Defined in

lib/date-parser.service.ts:43


parseDateTime

parseDateTime(date): string

Return a user-friendly string representation of the date and time

Parameters

NameType
dateDate

Returns

string

The parsed date

Defined in

lib/date-parser.service.ts:55


parseTime

parseTime(date): string

Return a user-friendly string representation of the time

Parameters

NameType
dateDate

Returns

string

The parsed time

Defined in

lib/date-parser.service.ts:31

© Getstream.io, Inc. All Rights Reserved.