
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Time ranges for Ruby
Add this line to your application’s Gemfile:
gem 'timerange'
time_range = TimeRange.new(7.days.ago..Time.now)
time_range.step(1.day)
time_range.expand(:week).step(1.day)
TimeRange.new("2014-06-01", "2014-06-07")
TimeRange.new("2014-06-01", duration: 1.week)
TimeRange.new("2014-06-01", within: 5.minutes)
TimeRange.new(4.weeks.ago).expand_start(:week) # last 4 weeks
TimeRange.today
TimeRange.yesterday
TimeRange.today + 4.weeks
TimeRange.today - 4.weeks
TimeRange.bucket(:hour, user.created_at)
TimeRange.bucket(:day, user.created_at, day_start: 2) # 2 am
TimeRange.bucket(:week, user.created_at, week_start: :mon) # start weeks on Monday
TimeRange.bucket(:month, user.created_at, time_zone: "Pacific Time (US & Canada)")
TimeRange.time_zone = "Pacific Time (US & Canada)" # defaults to Time.zone
Everyone is encouraged to help improve this project. Here are a few ways you can help:
FAQs
Unknown package
We found that timerange 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
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.