@types/next-biz-date
TypeScript icon, indicating that this package has built-in type declarations

2.1.3 • Public • Published

Installation

npm install --save @types/next-biz-date

Summary

This package contains type definitions for next-biz-date (https://github.com/janunezc/next-biz-date#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/next-biz-date.

index.d.ts

import { Moment } from "moment";
/**
 * Returns the next applicable business day for a given candidate day.
 * If candidateDate is a business day then it returns the same provided candidateDate.
 * @param candidateDate Date to evaluate first for being bizdate (moment or string on yyyy-mm-dd format)
 * @param holidaysArray Array of holidays (strings on yyyy-mm-dd format)
 * @param direction FORWARD or BACKWARDS
 */
export function FindBizDate(candidateDate: Moment, holidaysArray: string[], direction?: Direction): Moment;

/***
 * Calculates next applicable business day out of counting bizdates starting from a provided base date up to a provided countTarget by skipping holidays and weekends.
 * @param baseDate date to start counting. Also conceptualized as day 0.
 * @param holidaysArray Array of holidays to consider.
 * @param [countTarget] Number of biz dates count.
 * @param [direction] FORWARD or BACKWARDS to count to the future or to the past respectively.
 */
export function FindNextBizDate(
    baseDate: string,
    holidaysArray: string[],
    countTarget?: number,
    direction?: Direction,
): Moment;

/**
 * count to the future or to the past respectively
 */
export type Direction = "FORWARD" | "BACKWARDS";

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: moment

Credits

These definitions were written by Piotr Błażejewicz.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/next-biz-date

Weekly Downloads

3

Version

2.1.3

License

MIT

Unpacked Size

5.15 kB

Total Files

5

Last publish

Collaborators

  • types