# @types/moment-business-time

> TypeScript definitions for moment-business-time

Latest version **1.1.5** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/moment-business-time
pnpm add @types/moment-business-time
yarn add @types/moment-business-time
bun add @types/moment-business-time
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2025-10-24 |
| First published | 2017-12-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51446 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/moment-business-time
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-business-time
- npm.io page: https://npm.io/package/@types/moment-business-time

## Dependencies (1)

- [moment](https://npm.io/package/moment.md) ^2.24.0

## Recent versions

- 1.1.5 (latest) — 2025-10-24
- 1.1.4 (ts5.1) — 2023-11-07
- 1.1.1 (ts3.8) — 2021-07-08
- 1.1.0 (ts3.5) — 2020-12-18
- 0.7.2 (ts3.1) — 2020-02-26
- 0.7.1 (ts2.3) — 2017-12-13
- 1.1.3 — 2023-10-18
- 1.1.2 — 2023-09-27
- 0.7.0 — 2017-12-07

## README

# Installation
> `npm install --save @types/moment-business-time`

# Summary
This package contains type definitions for moment-business-time (https://github.com/lennym/moment-business-time).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-business-time.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-business-time/index.d.ts)
````ts
import moment = require("moment");

declare module "moment" {
    interface Moment {
        nextWorkingDay: () => Moment;
        nextWorkingTime: () => Moment;

        /**
         * Returns a new object with moment and transition properties representing
         * the next moment when the business will transition between 'open' and 'closed' states.
         */
        nextTransitionTime: () => TransitionTime;

        /**
         * Returns a new object with moment and transition properties representing
         * the most recent moment when the business transitioned between 'open' and 'closed' states.
         */
        lastTransitionTime: () => TransitionTime;

        lastWorkingDay: () => Moment;
        lastWorkingTime: () => Moment;

        addWorkingTime: (...args: Array<number | unitOfTime.Base>) => Moment;
        subtractWorkingTime: (...args: Array<number | unitOfTime.Base>) => Moment;

        workingDiff: (moment: Moment, unit: unitOfTime.Base, fractions?: boolean) => number;

        isWorkingDay: () => boolean;
        isWorkingTime: () => boolean;
    }

    interface WorkingHoursMap {
        0: string[] | null;
        1: string[] | null;
        2: string[] | null;
        3: string[] | null;
        4: string[] | null;
        5: string[] | null;
        6: string[] | null;
    }

    interface LocaleSpecification {
        workinghours?: WorkingHoursMap | undefined;
        holidays?: string[] | undefined;
    }

    interface TransitionTime {
        moment: Moment;
        transition: "open" | "close";
    }
}

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [moment](https://npmjs.com/package/moment)

# Credits
These definitions were written by [Tomasz Nguyen](https://github.com/swist), and [Piotr Błażejewicz](https://github.com/peterblazejewicz).

---
_Source: https://npm.io/package/@types/moment-business-time · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
