npm.io
1.1.1 • Published 9 years ago

reql-to-moment

Licence
ISC
Version
1.1.1
Deps
0
Vulns
0
Weekly
0

reql-to-moment

GratiPay Downloads Version

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

Keywords