HTML Preparation code:
AخA
 
1
<!--your preparation HTML code goes here-->
Script Preparation code:
 
const date = "2025-03-05";
const yearToReplaceWith = "2017";
Tests:
  • replace

     
    const year = date.substring(0, 4);
    const newDate = date.replace(year, yearToReplaceWith);
  • setUTCFullYear

     
    const dateDate = new Date(date);
    dateDate.setUTCFullYear(yearToReplaceWith);
    const newDate = dateDate.toISOString().substring(0, 10);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    replace
    setUTCFullYear

    Fastest: N/A

    Slowest: N/A

Latest run results:

No previous run results

This benchmark does not have any results yet. Be the first one to run it!