Use JavaScript’s built-in Intl.DateTimeFormat with a locale and explicit formatting options. The locale supplies conventions such as language and field order; options let you choose the calendar, numbering system, time zone, and date or time detail. Set a time zone deliberately when output must be consistent, because the same Date instant can appear as a different day in another zone.
Format a date for a locale
Pass a BCP 47 locale tag such as en-US, en-GB, fr-FR, or ja-JP to Intl.DateTimeFormat. It selects language and locale conventions, including date-field order. For example, U.S. and U.K. conventions differ, so manually joining a month, day, and year with punctuation is not a reliable way to localize a date. See the MDN constructor reference.
const instant = new Date("2026-10-04T12:00:00Z");
const formatter = new Intl.DateTimeFormat("fr-FR", {
dateStyle: "full",
calendar: "gregory",
timeZone: "Europe/Paris",
});
console.log(formatter.format(instant));
The example uses a fixed instant and time zone so the result does not depend on the machine running it. If the interface should follow the user’s preferred locale, pass the locale selected by the application rather than hard-coding one. An ordered list of locale tags can be supplied when fallback preferences are needed.
Choose the calendar and numbering system
A locale has a default calendar and numbering system, but you can request different ones. Use the calendar and numberingSystem options, or the corresponding Unicode locale extensions ca and nu in the locale tag. When both a locale extension and its matching option are supplied, the explicit option takes precedence. Calendar examples include gregory, persian, and chinese.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
const formatter = new Intl.DateTimeFormat("en-US-u-ca-persian-nu-arab", {
dateStyle: "long",
calendar: "gregory",
numberingSystem: "latn",
timeZone: "UTC",
});
Here the explicit options request the Gregorian calendar and Latin digits, overriding the extensions in the locale tag. To check which calendar values the runtime reports as supported where the method is available, use Intl.supportedValuesOf("calendar"). Defaults and support can vary by locale and runtime.
Set a time zone to control which day is displayed
A JavaScript Date represents an instant, not a date-only value. Formatting it in a time zone converts that instant to local date and time fields; it does not change the stored instant. Because a conversion can cross midnight, it can change the visible calendar day. MDN explains JavaScript date and time behavior in its internationalization guide.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
- Use
timeZone: "UTC"for a stable, zone-independent display convention. - Use an IANA zone such as
"America/New_York"or"Europe/Paris"when the date should reflect a particular region. - Omit
timeZoneonly when you intentionally want the runtime’s default zone. That choice can produce different output on different users’ devices.
You can request a zone name with timeZoneName. The localized name may be rendered in another form if the preferred form is unavailable.
Select a preset style or specific fields
Use dateStyle and timeStyle for locale-selected presets: "full", "long", "medium", or "short". For tighter control, request components such as weekday, year, month, day, hour, and minute.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
const dateOnly = new Intl.DateTimeFormat("en-GB", {
year: "numeric",
month: "short",
day: "numeric",
timeZone: "UTC",
});
console.log(dateOnly.format(new Date("2026-10-04T12:00:00Z")));
Do not combine a date or time style shortcut with individual date/time component options in the same options object. Choose a preset when locale-native compactness is useful; specify components when the interface requires particular fields.
Customize localized output without parsing punctuation
format() returns a localized string intended for display. Its punctuation, spacing, and other details can vary across implementations; output may include non-breaking spaces or bidirectional control characters. Do not split it on commas, slashes, or spaces to recover its fields.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
For custom markup or logic around individual pieces, use formatToParts(), which returns typed parts such as month, day, and year. See MDN’s formatToParts() reference and format() reference.
const formatter = new Intl.DateTimeFormat("en-GB", {
dateStyle: "medium",
timeZone: "UTC",
});
const parts = formatter.formatToParts(new Date("2026-10-04T12:00:00Z"));
for (const part of parts) {
console.log(part.type, part.value);
}
Build around the part types rather than assuming a particular order or separator. For tests, assert the requested settings or meaningful part behavior instead of requiring an exact formatted string across arbitrary runtimes.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Check locale negotiation and runtime defaults
Intl.DateTimeFormat.supportedLocalesOf() reports which requested locales are supported without falling back to the runtime’s default locale. Use it when locale negotiation matters, and inspect resolvedOptions() to see the locale, calendar, numbering system, and time zone the formatter actually uses. References: supportedLocalesOf() and resolvedOptions().
const requested = ["fr-FR", "en-GB"];
const supported = Intl.DateTimeFormat.supportedLocalesOf(requested);
const formatter = new Intl.DateTimeFormat(requested, {
dateStyle: "medium",
timeZone: "UTC",
});
console.log(supported);
console.log(formatter.resolvedOptions());
MDN describes Intl.DateTimeFormat as broadly available across browsers since September 2017, but that broad availability statement does not guarantee every newer option is supported in every target runtime. Check compatibility for the specific options your application requires. See the MDN overview.
Use Temporal values with their type-specific rules
Intl.DateTimeFormat also accepts Temporal date and time values, but not every type is used like a Date. A Temporal.ZonedDateTime should generally be formatted with its own toLocaleString() or converted appropriately. For non-ISO Temporal calendar values, provide a matching explicit calendar option. These distinctions matter when an application formats Temporal values; a basic Date workflow does not need them.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →

