roundate

Rounding functions for Date objects.

npm install roundate
1 downloads in the last week
3 downloads in the last month

Roundate

Roundate provides rounding functions for JavaScript Date objects.

Example

Roundate = require('roundate');

var date    = new Date('Sat, 05 Mar 2011 12:13:23 GMT'),
    rounded = Roundate.round(date, 'day');

console.log( rounded.toUTCString() ); // "Sun, 06 Mar 2011 00:00:00 GMT"

Downloads and Documentation

npm loves you