Skip to content

Tidepool's datetime library helping us to deal with diabetes data and dates

License

Notifications You must be signed in to change notification settings

tidepool-org/sundial

Repository files navigation

Sundial datetime wrapper

Build Status

The tidepool platform stores timestamps as ISO8601 timestamp with a timezone.

The purposes of this library are:

  1. Wrap the management of dates and times to insulate us from the specific mechanism
  2. Provide consistency for date operations
  3. Provide consistency for date and time formats

NB: In order to ensure the first goal above, no methods in the wrapper return anything but 'pure' JavaScript data types. Strings, numbers, and JavaScript Date objects are expected; 'moment' objects (via Moment.js) are not allowed.

Usage

Install with:

$ npm install --save sundial

Use in Node.js, or client-side with Webpack or Browserify:

var sundial = require('sundial');

Test

Run unit tests with:

$ npm test

Run the tests in-browser locally with:

$ npm run browser-tests

About

Tidepool's datetime library helping us to deal with diabetes data and dates

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published