@segment/to-iso-string

Cross-browser toISOString support.

Usage no npm install needed!

<script type="module">
  import segmentToIsoString from 'https://cdn.skypack.dev/@segment/to-iso-string';
</script>

README

to-iso-string

CircleCI Codecov

Cross-browser toISOString support.

Installation

npm install to-iso-string

Example

var toISOString = require('to-iso-string');
var date = new Date("05 October 2011 14:48 UTC");

toISOString(date);
// "2011-10-05T14:48:00.000Z"