New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

next-biz-date

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-biz-date - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "next-biz-date",
"version": "2.0.0",
"version": "2.0.1",
"description": "Returns the next business date (future or past based on direction as FORWARD or BACKWARDS) for a given reference date (initialDate), offset count value, direction and given array of holidays",

@@ -5,0 +5,0 @@ "main": "main.js",

@@ -24,3 +24,3 @@ # next-biz-date

4. Call the `FindNextBizDate()` function passing the `candidateDate`, the `holidaysArray`, `offset` and `direction` you defined.
5. The function will determine if the proposed date (i.e.: 2020-12-24) plus offset (1) on the corresponding direction (FORWARD) is a business day (not a weekend day,not a holiday). If it is not, then it will scan for the next business day.
5. The function will determine the date that results from counting business days, skipping holidays and weekend days begining from the proposed date as "day 0" (i.e.: 2020-12-24) with offset (1) on the corresponding direction (FORWARD) is a business day (not a weekend day,not a holiday). If it is not, then it will scan for the next business day.
6. Result: For `InitialDate=2020-12-24, offset=1, direction=FORWARD and holidays = ["2020-12-25","2020-12-28","2021-01-01"]` the result will be `*2020-12-29*`

@@ -55,2 +55,2 @@

});
```
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc