microtime2iso
convert decimal time values to iso8601
Last updated 3 years ago by mihar .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install microtime2iso 
SYNC missed versions from official npm registry.

microtime2iso

Convert decimal time values to ISO8601

var microtime2iso = require('microtime2iso');

microtime2iso('1420242927.139');
// 2015-01-02T23:55:27.139Z

microtime2iso(1420242927.139456);
// 2015-01-02T23:55:27.139456Z

microtime2iso('1420242927');
// 2015-01-02T23:55:27.000Z

API

microtime2iso(decimal)

decimal should be a number or number-string following the format SSS.uuuuuu Where S is seconds and u is microseconds. Any decimal value between 0 and 6 (microseconds) is allowed.

License

MIT

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 2
Dependencies (0)
None
Dev Dependencies (1)
Dependents (1)

Copyright 2014 - 2017 © taobao.org |