Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
DateTimeFormat vs toLocaleDateString
(version: 0)
Comparing performance of:
formatter vs toLocaleDateString
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
const formatter = Intl.DateTimeFormat(["en"], { month: 'short', day: 'numeric', })
Tests:
formatter
formatter.format(new Date());
toLocaleDateString
new Date().toLocaleDateString("en", { month: 'short', day: 'numeric' })
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
formatter
toLocaleDateString
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36
Browser/OS:
Chrome 141 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
formatter
2228548.8 Ops/sec
toLocaleDateString
51510.0 Ops/sec
Related benchmarks:
toLocaleDateString()
toLocaleString vs window.Intl.NumberFormat
DateTimeFormat vs toLocaleDateString 3
cached Intl.NumberFormat vs toLocalString
Comments
Confirm delete:
Do you really want to delete benchmark?