
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
fed-banking-days
Advanced tools
Date helpers to calculate future banking days based on Federal Reserve holidays
A programmatic implementation of the Federal Reserve holiday schedule. Useful for providing timing estimates for Fed-processed transactions like ACH transfers.
Install using npm:
npm install fed-banking-days
Typescript:
import { nextBankingDay } from 'fed-banking-days';
or JavaScript:
const { nextBankingDay } = require('fed-banking-days');
nextBankingDayThe primary function, nextBankingDay, returns the Date that is the start of business (9am ET) on the next valid Fed banking day, as well as the latest holiday in between the given date and the next banking day.
For example:
…a Wednesday so the next banking day is tomorrow, Thursday.
> nextBankingDay(new Date('2022-06-15T06:00:00Z'))
[ 2022-06-16T13:00:00.000Z, undefined ]
…a Friday before a Sunday-holiday observed on Monday, so the next banking day is Tuesday.
> nextBankingDay(new Date('2022-06-17T06:00:00Z'))
[ 2022-06-21T13:00:00.000Z, 'Juneteenth National Independence Day' ]
Optionally, provide a minimum number of days to advance:
> nextBankingDay(new Date('2022-06-17T06:00:00Z'), 3)
[ 2022-06-23T13:00:00.000Z, 'Juneteenth National Independence Day' ]
> nextBankingDay(new Date('2022-06-17T06:00:00Z'), 10)
[ 2022-07-05T13:00:00.000Z, 'Independence Day' ]
useBusinessHoursBy default, nextBankingDay will consider times after end-of-business (5pm ET) to be part of the next banking day, for more conservative estimates about ACH deposit availability. To disable this behavior and consider any time of a day to be part of that same banking day, pass useBusinessHours: false:
> nextBankingDay(new Date('2022-06-15T19:00:00-04:00')) // default behavior
[ 2022-06-17T13:00:00.000Z, undefined ]
> nextBankingDay(new Date('2022-06-15T19:00:00-04:00'), 1, { useBusinessHours: false })
[ 2022-06-16T13:00:00.000Z, undefined ]
This package is licensed under the MIT License.
See ./LICENSE for more information.
FAQs
Date helpers to calculate future banking days based on Federal Reserve holidays
We found that fed-banking-days demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.