New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

rounded-timestamp

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rounded-timestamp

rounded timestamp utilities

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
5
-16.67%
Maintainers
1
Weekly downloads
 
Created
Source

rounded-timestamp

Rounded timestamp utility functions, useful for things like generating redis keys.

Installation

$ npm install rounded-timestamp

Example

var timestamp = require('rounded-timestamp');
var ms = require('ms');

console.log(timestamp.second());
console.log(timestamp.minute());
console.log(timestamp.hour());
console.log(timestamp.day());

console.log();
var date = new Date - ms('1d');
console.log(timestamp.second(date));
console.log(timestamp.minute(date));
console.log(timestamp.hour(date));
console.log(timestamp.day(date));

yields:

1400015159000
1400015100000
1400014800000
1399939200000

1399928759000
1399928700000
1399928400000
1399852800000

License

MIT

Keywords

redis

FAQs

Package last updated on 13 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts