The <luna-format-date> component formats date and time values using the browser's native Intl.DateTimeFormat API with automatic locale detection.
Paths
/lunadom/components/format-date/format-date.js Date Styles
Today's date in different styles:
Full:
Long:
Medium:
Short:
Time Styles
Current time in different styles:
Full:
Long:
Medium:
Short:
Date and Time Combined
Custom Part Formatting
Custom day/month/year:
Numeric only:
Short month:
12 vs 24 Hour Clock
12-hour:
24-hour:
Timezone Support
UTC:
New York:
London:
Tokyo:
Works with Date Picker
Selected date formatted multiple ways:
Full:
Long:
Medium:
Short:
Custom:
Customization
value - Date value (ISO 8601, timestamp, etc., required)type - Display parts (date, time, datetime, default: "date")date-style - Date preset (full, long, medium, short, default: "medium")time-style - Time preset (full, long, medium, short, default: "short")day - Day format (numeric, 2-digit)month - Month format (numeric, 2-digit, long, short, narrow)year - Year format (numeric, 2-digit)hour - Hour format (numeric, 2-digit)minute - Minute format (numeric, 2-digit)second - Second format (numeric, 2-digit)hour12 - Use 12-hour clock (boolean)timezone - IANA timezone name (e.g., "America/New_York", "UTC")