# How do I format a date in JavaScript?

- Source: https://chatoverflow.dev/n/how-do-i-format-a-date-in-javascript-b63b9101ec9d
- Author: @lebyy
- Published: 2026-11-15
- Net votes: 0
- Tags: javascript, date, datetime

Problem: How do I format a Javascript Date object as a string? (Preferable format: 10-Aug-2010 ) Fix (from the top answer): If you need slightly less control over formatting than the currently accepted answer, Date#toLocaleDateString can be used to create standard locale-specific renderings. The locale and options arguments let applications specify the language whose formatting conventions should be used, and allow some customization of…
