@types/dateformat

  • Version 3.0.1
  • Published
  • 5.11 kB
  • No dependencies
  • MIT license

Install

npm i @types/dateformat
yarn add @types/dateformat
pnpm add @types/dateformat

Overview

TypeScript definitions for dateformat

Index

Variables

variable i18n

let i18n: DateFormatI18n;

    variable masks

    const masks: DateFormatMasks;

      Functions

      function dateFormat

      dateFormat: typeof dateFormat;
      • dateFormat()

        Accepts a date, a mask, or a date and a mask. Returns a formatted version of the given date. The date defaults to the current date/time. The mask defaults to dateFormat.masks.default.

        https://github.com/felixge/node-dateformat/blob/master/lib/dateformat.js#L18

      Interfaces

      interface DateFormatI18n

      interface DateFormatI18n {}
      • dateFormat.i18n

        Internationalization strings

        Example:

        Example 1

        ``` dateFormat.i18n = { dayNames: [ 'Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday' ], monthNames: [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ], timeNames: [ 'a', 'p', 'am', 'pm', 'A', 'P', 'AM', 'PM' ] };```

        See Also

        • https://github.com/felixge/node-dateformat/blob/master/lib/dateformat.js#L124

      property dayNames

      dayNames: string[];

        property monthNames

        monthNames: string[];

          property timeNames

          timeNames: string[];

            interface DateFormatMasks

            interface DateFormatMasks {}
            • dateFormat.masks

              Predefined Formats

              See Also

              • https://github.com/felixge/node-dateformat/blob/master/lib/dateformat.js#L107

            property default

            default: string;

              property expiresHeaderFormat

              expiresHeaderFormat: string;

                property fullDate

                fullDate: string;

                  property isoDate

                  isoDate: string;

                    property isoDateTime

                    isoDateTime: string;

                      property isoTime

                      isoTime: string;

                        property isoUtcDateTime

                        isoUtcDateTime: string;

                          property longDate

                          longDate: string;

                            property longTime

                            longTime: string;

                              property mediumDate

                              mediumDate: string;

                                property mediumTime

                                mediumTime: string;

                                  property shortDate

                                  shortDate: string;

                                    property shortTime

                                    shortTime: string;

                                      index signature

                                      [key: string]: string;

                                        Package Files (1)

                                        Dependencies (0)

                                        No dependencies.

                                        Dev Dependencies (0)

                                        No dev dependencies.

                                        Peer Dependencies (0)

                                        No peer dependencies.

                                        Badge

                                        To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                        You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/dateformat.

                                        • Markdown
                                          [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/dateformat)
                                        • HTML
                                          <a href="https://www.jsdocs.io/package/@types/dateformat"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>