date format

Benchmark created on


Description

format date with date.toLocaleDateString

Setup

const formatter = new Intl.DateTimeFormat('en-CA', { dateStyle: 'short' });
const date = new Date('2024-03-01');

Test runner

Ready to run.

Testing in
TestOps/sec
tolocale
date.toLocaleDateString('en-CA')
ready
format
formatter.format(date)
ready

Revisions

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