Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Finds the Next Working Day even if holidays are in the way.
Extends Date
, Time
and DateTime
to allow you to find the next working day
Nextday only checks for English public holidays at the moment, I aim to extend it to support locales in the near future.
Date.today.next_working_day
DateTime.today.next_working_day
Time.now.next_working_day
Date.today.previous_working_day
DateTime.today.previous_working_day
Time.now.previous_working_day
Date.today.working_day?
DateTime.today.working_day?
Time.now.working_day?
Date.today.despatch_day
DateTime.today.despatch_day
Time.now.despatch_day
Date.today.delivery_day
DateTime.today.delivery_day
Time.now.delivery_day
To make caching easier you can mount the Nextday::JSON
in your application so you can poll it every few minutes and have next to real time data.
It will return so:
{
"cut_off_time": "16:00",
"working_day": false,
"next_working_day": "2012-06-11",
"previous_working_day": "2012-06-08",
"despatch_day": "2012-06-11",
"delivery_day": "2012-06-12"
}
require 'nextday/json'
YourAmazing::Application.routes.draw do
mount Nextday::JSON.new, :at => "/nextday.json"
end
To set the cut off time to a different value:
Nextday::Config.cut_off_time = "18:47"
To use with bundler add nextday to your gem file.
gem 'nextday'
FAQs
Unknown package
We found that nextday 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.