Date formatter test (v4)

Revision 4 of this benchmark created on


Test runner

Ready to run.

Testing in
TestOps/sec
Const
const timeHoursFormatter = new Intl.DateTimeFormat('en-gb', {
  hour: '2-digit',
  minute: '2-digit'
});

function formatTimeHours(timestamp) {
  return timeHoursFormatter.format(timestamp);
}

for (let i=0; i < 2; i++) {
  formatTimeHours(1685453271340);
}
ready
No const


function formatTimeHours(timestamp) {
	return new Intl.DateTimeFormat('en-gb', {
  hour: '2-digit',
  minute: '2-digit'
}).format(timestamp)
}

for (let i=0; i < 2; i++) {
  formatTimeHours(1685453271340);
}
ready

Revisions

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