Test name | Executions per second |
---|---|
Moment | 24148.5 Ops/sec |
Offset | 44036.1 Ops/sec |
<script src="https://cdn.rawgit.com/moment/moment/2.7.0/moment.js"></script>
<script src="https://cdn.rawgit.com/moment/moment-timezone/0.2.2/builds/moment-timezone-with-data.js"></script></script>
var dateObject = new Date('2016-11-03T12:00:00Z');
var timezone = 'Australia/Perth';
var format = 'YYYY-MM-DDTHH:mm:ss';
var dateString = moment().format();
var newDateObject = new Date().toLocaleDateString();