
Security News
152 Chrome Live Wallpaper Extensions Hid Ad Tracking and Faked Google Search Traffic
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.
time-interval
Advanced tools
用于计算两个时间间隔,支持任意单位
npm install time-interval --save
// 初始化
// 该数组参数的含义就是各个单位对应的毫秒数(程序会对数组排序)
var timeInterval = new TimeInterval([86400000, 3600000, 60000, 1000])
// 计算2017-03-16 13:00:00 至 2017-03-17 15:10:30 相差的 天 时 分 秒
timeInterval.get(new Date('Fri Mar 16 2017 13:00:00 GMT+0800'), new Date('Fri Mar 17 2017 15:10:30 GMT+0800'))
// 返回:[1, 2, 10, 30] 即 1天2时10分30秒
date1(Date): 待比较的日期1
date2(Date): 待比较的日期2。默认值:当前时间
返回:按初始化单位的从大到小顺序计算出的间隔数组
FAQs
The npm package time-interval receives a total of 1 weekly downloads. As such, time-interval popularity was classified as not popular.
We found that time-interval demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.