Duration
The Duration component is designed to represent time durations derived from epoch time values in an easily interpretable format. It’s suitable for displaying durations like processing times, event lengths, or intervals in a human-format .
Quick Start
To start using the Duration component, import it from the reablocks library and provide the value props in miliseconds.
1.43 days
Examples
API
Component
Function
For more advanced scenarios or when you need to programmatically format data sizes within your application logic,
you can use the formatDuration function provided by the API:
import { formatDuration, DurationFormatTypes } from 'reablocks';
function yourFunction(size: DurationFormatTypes) {
// size = number | string | null | undefined;
return formatDuration(size);
}Last updated on