npm.io
1.0.5 • Published 5 months ago

@types/dayjs-recur

Licence
MIT
Version
1.0.5
Deps
1
Size
6 kB
Vulns
0
Weekly
0
Stars
51.3K

Installation

npm install --save @types/dayjs-recur

Summary

This package contains type definitions for dayjs-recur (https://github.com/FraserHamilton/dayjs-recur).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/dayjs-recur.

index.d.ts

declare const ignored: any; // just to satisfy ci
export {};

import { Dayjs, PluginFunc } from "dayjs";
declare const defaultExport: PluginFunc;
export = defaultExport;

interface Recurrence {
    every(unit: number | string | number[] | string[], measurementType?: string): Recurrence;
    day(unit?: string): Recurrence;
    days(unit?: string): Recurrence;
    week(unit?: string): Recurrence;
    weeks(unit?: string): Recurrence;
    month(unit?: string): Recurrence;
    months(unit?: string): Recurrence;
    year(unit?: string): Recurrence;
    years(unit?: string): Recurrence;
    dayOfWeek(unit?: string): Recurrence;
    daysOfWeek(unit?: string): Recurrence;
    dayOfMonth(unit?: string): Recurrence;
    daysOfMonth(unit?: string): Recurrence;
    weekOfMonth(unit?: string): Recurrence;
    weeksOfMonth(unit?: string): Recurrence;
    weeksOfMonthByDay(unit?: string): Recurrence;
    weekOfYear(unit?: string): Recurrence;
    weeksOfYear(unit?: string): Recurrence;
    monthOfYear(unit?: string): Recurrence;
    monthsOfYear(unit?: string): Recurrence;
    forget(date: string): Recurrence;
    except(date: string): Recurrence;
    matches(date: string, outbound?: boolean): boolean;
    fromDate(date: string | Dayjs): Recurrence;
    next(): Dayjs;
    next(count: number): Dayjs[];
    previous(): Dayjs;
    previous(count: number): Dayjs[];
    all(): Dayjs[];
}

declare module "dayjs" {
    function recur(
        start?: string | Dayjs,
        end?: string | Dayjs,
    ): Recurrence;
    function recur(options?: {
        start?: string | Dayjs;
        end?: string | Dayjs;
    }): Recurrence;

    interface Dayjs {
        recur(start?: string | Dayjs, end?: string | Dayjs): Recurrence;
        recur(options?: {
            start?: string | Dayjs;
            end?: string | Dayjs;
        }): Recurrence;
        monthWeekByDay(): number;
        monthWeek(): number;
    }
}

Additional Details

  • Last updated: Tue, 13 Jan 2026 0954 GMT
  • Dependencies: dayjs

Credits

These definitions were written by Shahin Sorkh.