npm.io
3.0.1 • Published 11 months ago

@types/moment-business

Licence
MIT
Version
3.0.1
Deps
1
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/moment-business

Summary

This package contains type definitions for moment-business (https://github.com/jmeas/moment-business).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/moment-business.

index.d.ts

import moment = require("moment");

/**
 * Calculate the number of week days between `startMoment` and `endMoment`. Week days are Monday through Friday.
 * If `endMoment` comes before `startMoment`, then this function will return a negative value.
 */
export function weekDays(startMoment: moment.Moment, endMoment: moment.Moment): number;

/**
 * Calculate the number of weekend days between the `startMoment` and `otherMoment`. Weekend days are Saturday and Sunday.
 * If `endMoment` comes before `startMoment`, then this function will return a negative value.
 */
export function weekendDays(startMoment: moment.Moment, endMoment: moment.Moment): number;

/**
 * Add week days to a moment, modifying the original moment. Returns the moment.
 */
export function addWeekDays(moment: moment.Moment, amount: number): moment.Moment;

/**
 * Subtract week days from the moment, modifying the original moment. Returns the moment.
 */
export function subtractWeekDays(moment: moment.Moment, amount: number): moment.Moment;

/**
 * Whether or not the Moment is a week day (Monday - Friday).
 */
export function isWeekDay(moment: moment.Moment): boolean;

/**
 * Whether or not the Moment occurs on Saturday or Sunday.
 */
export function isWeekendDay(moment: moment.Moment): boolean;

Additional Details

  • Last updated: Fri, 24 Oct 2025 0441 GMT
  • Dependencies: moment

Credits

These definitions were written by Greg Sieranski.