Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
this is a testd
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36 Edg/132.0.0.0
Browser:
Chrome 132
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
luxon
195772.9 Ops/sec
js native
6888187.5 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/luxon@1.26.0/build/global/luxon.min.js"></script>
Script Preparation code:
const TIME_ZONE = "America/New_York"; const ms = 1789465498465; function getFormattedDateTime(ms = undefined) { const now = new Date(ms); // Extract components const year = now.getFullYear(); const month = String(now.getMonth() + 1).padStart(2, "0"); const day = String(now.getDate()).padStart(2, "0"); const hours = String(now.getHours()).padStart(2, "0"); const minutes = String(now.getMinutes()).padStart(2, "0"); const seconds = String(now.getSeconds()).padStart(2, "0"); // Milliseconds (3-digit precision) const milliseconds = String(now.getMilliseconds()).padStart(3, "0"); return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}.${milliseconds}`; }
Tests:
luxon
const minuteStart = luxon.DateTime.fromMillis(ms, { zone: TIME_ZONE }).toSQL({ includeOffset: false });
js native
const minuteStart = getFormattedDateTime(ms);