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
Name | Type |
---|---|
date | Date |
Returns
string
Defined in
customDateTimeParser
• Optional
customDateTimeParser: (date
: Date
) => string
Type declaration
▸ (date
): string
Custom parser to override parseDateTime
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
Defined in
customTimeParser
• Optional
customTimeParser: (date
: Date
) => string
Type declaration
▸ (date
): string
Custom parser to override parseTime
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
Defined in
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
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
parseTime
▸ parseTime(date
): string
Return a user-friendly string representation of the time
Parameters
Name | Type |
---|---|
date | Date |
Returns
string
The parsed time