toLocaleDateString vs Intl.DateTimeFormat

Benchmark created on


Setup

var date = new Date();

Test runner

Ready to run.

Testing in
TestOps/sec
toLocaleDateString
date.toLocaleDateString('fr-FR', {
  day: 'numeric',
  month: 'long',
  year: 'numeric',
})
ready
Intl.DateTimeFormat
new Intl.DateTimeFormat('fr-FR', {
  day: 'numeric',
  month: 'long',
  year: 'numeric',
}).format(date)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.