Utilities
Format time

Format Time

Used to format time values to a specific locale and options

Next departure

6:47 PM

Usage

The time formatting logic supports both string (HH:mm[:ss]) and Date inputs.

import { Format } from '@ark-ui/react'

Examples

Basic

Use the Format.Time component to format a time value with default options.

Date

Use a Date object as the value.

Seconds

Use the withSeconds prop to include seconds in the output.

AM/PM Labels

Use amPmLabels to customize day-period labels when using 12-hour format.

Locale

Use the locale provider to format the time according to a specific locale.