shadow
The RelativeTime component is an element used to display the relative time based on the inserted date. Calculates and displays the relative time difference between the current date and the specified date. The relative time format is localized based on the language of the user's browser.
Description | Sets the date of the relative time component. |
Attribute | date |
Type | string |
Default | undefined |
Description | Sets the language of the relative time component. |
Attribute | window |
Type | string |
Default | undefined |
No events available for this component.
Description | Returns the relative time string for the specified date. |
Signature | getRelativeTimeString(lang = navigator.language) => string |
Description | Checks if the string is in ISO date format. |
Signature | isISODate(str) => boolean |
Name | Description |
---|
native | Refers to div inside an element. |
No CSS custom properties available for this component.
No slots available for this component.