DateParserService
The DateParserService
parses dates into user-friendly string representations.
Properties
customDateParser
• Optional
customDateParser: (date
: Date
) => string
Custom parser to override parseDate
Type declaration
▸ (date
): string
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
Defined in
projects/stream-chat-angular/src/lib/date-parser.service.ts:18
customDateTimeParser
• Optional
customDateTimeParser: (date
: Date
) => string
Custom parser to override parseDateTime
Type declaration
▸ (date
): string
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
Defined in
projects/stream-chat-angular/src/lib/date-parser.service.ts:22
customTimeParser
• Optional
customTimeParser: (date
: Date
) => string
Custom parser to override parseTime
Type declaration
▸ (date
): string
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
Defined in
projects/stream-chat-angular/src/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
Name | Type |
---|---|
date | Date |
Returns
string
The parsed date
Defined in
projects/stream-chat-angular/src/lib/date-parser.service.ts:43
parseDateTime
▸ parseDateTime(date
): string
Return a user-friendly string representation of the date and time
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
The parsed date
Defined in
projects/stream-chat-angular/src/lib/date-parser.service.ts:55
parseTime
▸ parseTime(date
): string
Return a user-friendly string representation of the time
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
The parsed time
Defined in
projects/stream-chat-angular/src/lib/date-parser.service.ts:31