npm.io
1.1.3 • Published 2 years ago

@types/jquery-formatdatetime

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

Installation

npm install --save @types/jquery-formatdatetime

Summary

This package contains type definitions for jquery-formatdatetime (https://github.com/agschwender/jquery.formatDateTime).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery-formatdatetime.

index.d.ts

/// <reference types="jquery" />

export type Options = Partial<{
    /**
     * Names of the months, e.g. January
     */
    monthNames: string[];

    /**
     * Shortened names of the months, e.g. Jan
     */
    monthNamesShort: string[];

    /**
     * Names of the days, e.g. Sunday
     */
    dayNames: string[];

    /**
     * Shortened names of the days, e.g. Sun
     */
    dayNamesShort: string[];

    /**
     * Names of the 12-hour clock periods, e.g. AM
     */
    ampmNames: string[];

    /**
     * Callback to convert number to ordinal suffix, e.g. 1 to st
     */
    getSuffix: (num: number) => string;

    /**
     * Attribute which contains the datetime
     */
    attribute: string;

    /**
     * Attribute which contains the datetime format
     */
    formatAttribute: string;

    /**
     * Render dates in UTC instead of local timezone
     */
    utc: boolean;
}>;

declare global {
    interface JQuery {
        formatDateTime(format: string, options?: Options): JQuery;
    }

    interface JQueryStatic {
        formatDateTime(format: string, date: Date, options?: Options): string;
    }
}

Additional Details

  • Last updated: Tue, 07 Nov 2023 0337 GMT
  • Dependencies: @types/jquery

Credits

These definitions were written by Anderson Friaça.