reql-to-moment
v1.1.1
Published
A helper function to convert raw ReQL time object to moment.js preserving time zone information. This is useful for reading raw time objects from RethinkDB.
Downloads
10
Readme
reql-to-moment
A helper function to convert raw ReQL time object to moment.js preserving time zone information. This is useful for reading raw time objects from RethinkDB.
Installation
reql-to-moment
expects that you have already installed moment
.
npm instal --save-dev reql-to-moment
Usage
import reqlToMoment from 'reql-to-moment';
reqlToMoment({
$reql_type$: 'TIME',
epoch_time: 1286730000,
timezone: '-07:00',
});
// returns moment.js object
License
ISC