XRPLF / xrpl.js

A JavaScript/TypeScript API for interacting with the XRP Ledger in Node.js and the browser
https://xrpl.org/
1.2k stars 511 forks source link

Expose rippleTimeToISO8601() #959

Closed intelliot closed 4 years ago

intelliot commented 5 years ago

This is useful when parsing a timestamp from the ledger.

It's the reverse of iso8601ToRippleTime()* and we should add tests to ensure that it reverses correctly.

* Previously exposed in https://github.com/ripple/ripple-lib/pull/898 for creating timestamps to pass to prepareTransaction()

See comment: https://github.com/ripple/ripple-lib/pull/926#issuecomment-417155676

intelliot commented 4 years ago

This is done. Docs: https://xrpl.org/rippleapi-reference.html#rippletimetoiso8601