Skip to main content

Relative Time

Reorder | ion-reorder: Drag and Drop Icon to Reorder Items 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.

Basic Usage

Attributes and Properties

date

DescriptionSpecifies the date or timestamp in ISO format or Unix timestamp format (in seconds). If no date attribute is specified, the component defaults to the current date and time.
Attributedate
Typestring
DefaultCurrent date and time

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

No CSS custom properties available for this component.

Slots

No slots available for this component.