const date = toNanoDate('1475985480231035600')
// You can use the returned Date as a normal date:
expect(date.getTime()).to.equal(1475985480231);
// We decorate it with two additional methods to read
// nanosecond-precision results:
expect(date.getNanoTime()).to.equal('1475985480231035600');
expect(date.toNanoISOString()).to.equal('2016-10-09T03:58:00.231035600Z');
Covers a nanoseconds unix timestamp to a INanoDate for node-influx. The timestamp is provided as a string to prevent precision loss.
Please see A Moment for Times for a more complete and eloquent explanation of time handling in this module.