Script Preparation code:
AخA
 
var date = "2023-10-10T10:02:54.959-12:12"
Tests:
  • test1

     
    var regex = /^([+-]?\d{6}|\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])T([01]\d|2[0-3]):[0-5]\d:[0-5]\d\.\d{1,3}([+-]([01]\d|2[0-3]):[0-5]\d|Z)$/;
    var result = regex.test(date);
    console.log(result);
  • test2

     
    var split = date.split("\s:+-")
    console.log(split)
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    test1
    test2

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
test1 340993.8 Ops/sec
test2 320010.8 Ops/sec