@types/moment-business
TypeScript icon, indicating that this package has built-in type declarations

3.0.0 • Public • Published

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.

import * as moment from "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: Sun, 03 Nov 2024 04:02:17 GMT
  • Dependencies: moment

Credits

These definitions were written by Greg Sieranski.

/@types/moment-business/

    Package Sidebar

    Install

    npm i @types/moment-business

    Weekly Downloads

    15,177

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    5.24 kB

    Total Files

    5

    Last publish

    Collaborators

    • types