Skip to content

formatDate()

Formats a date-like value using predefined presets or a custom pattern.

Example:

ts
formatDate('2024-03-15', { format: 'time-short' });

Released under the MIT License.