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

1.0.3 • Public • Published

Installation

npm install --save @types/ultra-strftime

Summary

This package contains type definitions for ultra-strftime (https://github.com/xio4/ultra_strftime).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ultra-strftime.

index.d.ts

declare function strftime(fmt: string, d?: Date, locale?: strftime.Locale, options?: strftime.Options): string;
declare function strftime(fmt: string, locale?: strftime.Locale, options?: strftime.Options): string;

declare namespace strftime {
    type StrftimeFunction = (fmt: string, d?: Date, options?: Options) => string;

    interface LocaleFormats {
        /** equivalent to %m/%d/%y in en_US */
        D: string;
        /** equivalent to %Y-%m-%d in en_US */
        F: string;
        /** equivalent to %H:%M in en_US */
        R: string;
        /** equivalent to %D in en_US */
        X: string;
        /** equivalent to %a %b %d %X %Y %Z in en_US */
        c: string;
        /** equivalent to %I:%M:%S %p in en_US */
        r: string;
        /** equivalent to %H:%M:%S in en_US */
        T: string;
        /** equivalent to %e-%b-%Y in en_US */
        v: string;
        /** equivalent to %T in en_US */
        x: string;
    }

    interface Locale {
        days: string[];
        shortDays: string[];
        months: string[];
        shortMonths: string[];
        AM: string;
        PM: string;
        am: string;
        pm: string;
        formats: LocaleFormats;
    }

    interface Options {
        timezone?: string | number | undefined;
        utc?: boolean | undefined;
    }

    function strftimeUTC(fmt: string, d?: Date, locale?: Locale): string;
    function strftimeTZ(fmt: string, d: Date, locale: Locale, timezone: number): string;
    function strftimeTZ(fmt: string, d: Date, timezone: number): string;
    function localizedStrftime(locale: Locale): StrftimeFunction;

    function strftime(fmt: string, d?: Date, locale?: Locale, options?: Options): string;
    function strftime(fmt: string, locale?: Locale, options?: Options): string;
}

export = strftime;

Additional Details

  • Last updated: Tue, 07 Nov 2023 15:11:36 GMT
  • Dependencies: none

Credits

These definitions were written by Piotr Roszatycki.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.10ts3.6
1.0.10ts3.7
1.0.10ts3.8
1.0.10ts3.9
1.0.10ts4.0
1.0.10ts4.1
1.0.10ts4.2
1.0.10ts4.3
1.0.10ts4.4
1.0.00ts2.0
1.0.00ts2.1
1.0.00ts2.2
1.0.00ts2.3
1.0.00ts2.4
1.0.00ts2.5
1.0.00ts2.6
1.0.00ts2.7
1.0.00ts2.8
1.0.00ts2.9
1.0.00ts3.0
1.0.00ts3.1
1.0.00ts3.2
1.0.00ts3.3
1.0.00ts3.4
1.0.00ts3.5
1.0.350ts5.7
1.0.350ts5.6
1.0.350latest
1.0.350ts4.5
1.0.350ts4.6
1.0.350ts4.7
1.0.350ts4.8
1.0.350ts4.9
1.0.350ts5.0
1.0.350ts5.1
1.0.350ts5.2
1.0.350ts5.3
1.0.350ts5.4
1.0.350ts5.5
1.0.350ts5.8

Version History

VersionDownloads (Last 7 Days)Published
1.0.350
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i @types/ultra-strftime

Weekly Downloads

26

Version

1.0.3

License

MIT

Unpacked Size

6.21 kB

Total Files

5

Last publish

Collaborators

  • types