formatTime
Sourceimport { formatTime } from "@prestojs/util";
formatTime(parts,options)
Format the parts of a time - as returned by parseTime - as a string using toLocaleString.
Note that while you can pass through options.timeZone this may be inaccurate if parts.timezoneOffset isn't
supplied.
| Parameter | Type | Description | |
|---|---|---|---|
| * | parts | TimeParts |Date | |
| options.localeOptions | Options to pass through to toLocaleString | ||
| options.locales | string|Array | Optional locales to use. See using locales for more information. |
Returns