parse date (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>

Setup

const dateToParse = '2023-01-13 19:18:17.040+02:00';

Test runner

Ready to run.

Testing in
TestOps/sec
Format with date js
const d = dayjs(dateToParse).format('dddd D MMMM YYYY-HH:mm');
d.split('-')
ready
Parse twice
dayjs(dateToParse).format('dddd D MMMM YYYY');
dayjs(dateToParse).format('HH:mm');
ready
Parse once format twice
const d = dayjs(dateToParse)
d.format('dddd D MMMM YYYY');
d.format('HH:mm');
ready

Revisions

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