aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/date-fns/intlFormat
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/date-fns/intlFormat')
-rw-r--r--node_modules/date-fns/intlFormat/index.d.ts4
-rw-r--r--node_modules/date-fns/intlFormat/index.js93
-rw-r--r--node_modules/date-fns/intlFormat/index.js.flow72
-rw-r--r--node_modules/date-fns/intlFormat/package.json5
4 files changed, 0 insertions, 174 deletions
diff --git a/node_modules/date-fns/intlFormat/index.d.ts b/node_modules/date-fns/intlFormat/index.d.ts
deleted file mode 100644
index fc29cf5..0000000
--- a/node_modules/date-fns/intlFormat/index.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
-
-import { intlFormat } from 'date-fns'
-export default intlFormat
diff --git a/node_modules/date-fns/intlFormat/index.js b/node_modules/date-fns/intlFormat/index.js
deleted file mode 100644
index 6816111..0000000
--- a/node_modules/date-fns/intlFormat/index.js
+++ /dev/null
@@ -1,93 +0,0 @@
-"use strict";
-
-var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
-Object.defineProperty(exports, "__esModule", {
- value: true
-});
-exports.default = intlFormat;
-var _index = _interopRequireDefault(require("../_lib/requiredArgs/index.js"));
-/**
- * @name intlFormat
- * @category Common Helpers
- * @summary Format the date with Intl.DateTimeFormat (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat).
- *
- * @description
- * Return the formatted date string in the given format.
- * The method uses [`Intl.DateTimeFormat`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat) inside.
- * formatOptions are the same as [`Intl.DateTimeFormat` options](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat#using_options)
- *
- * > ⚠️ Please note that before Node version 13.0.0, only the locale data for en-US is available by default.
- *
- * @param {Date|Number} argument - the original date.
- * @param {Object} [formatOptions] - an object with options.
- * @param {'lookup'|'best fit'} [formatOptions.localeMatcher='best fit'] - locale selection algorithm.
- * @param {'narrow'|'short'|'long'} [formatOptions.weekday] - representation the days of the week.
- * @param {'narrow'|'short'|'long'} [formatOptions.era] - representation of eras.
- * @param {'numeric'|'2-digit'} [formatOptions.year] - representation of years.
- * @param {'numeric'|'2-digit'|'narrow'|'short'|'long'} [formatOptions.month='numeric'] - representation of month.
- * @param {'numeric'|'2-digit'} [formatOptions.day='numeric'] - representation of day.
- * @param {'numeric'|'2-digit'} [formatOptions.hour='numeric'] - representation of hours.
- * @param {'numeric'|'2-digit'} [formatOptions.minute] - representation of minutes.
- * @param {'numeric'|'2-digit'} [formatOptions.second] - representation of seconds.
- * @param {'short'|'long'} [formatOptions.timeZoneName] - representation of names of time zones.
- * @param {'basic'|'best fit'} [formatOptions.formatMatcher='best fit'] - format selection algorithm.
- * @param {Boolean} [formatOptions.hour12] - determines whether to use 12-hour time format.
- * @param {String} [formatOptions.timeZone] - the time zone to use.
- * @param {Object} [localeOptions] - an object with locale.
- * @param {String|String[]} [localeOptions.locale] - the locale code
- * @returns {String} the formatted date string.
- * @throws {TypeError} 1 argument required.
- * @throws {RangeError} `date` must not be Invalid Date
- *
- * @example
- * // Represent 10 October 2019 in German.
- * // Convert the date with format's options and locale's options.
- * const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456), {
- * weekday: 'long',
- * year: 'numeric',
- * month: 'long',
- * day: 'numeric',
- * }, {
- * locale: 'de-DE',
- * })
- * //=> Freitag, 4. Oktober 2019
- *
- * @example
- * // Represent 10 October 2019.
- * // Convert the date with format's options.
- * const result = intlFormat.default(new Date(2019, 9, 4, 12, 30, 13, 456), {
- * year: 'numeric',
- * month: 'numeric',
- * day: 'numeric',
- * hour: 'numeric',
- * })
- * //=> 10/4/2019, 12 PM
- *
- * @example
- * // Represent 10 October 2019 in Korean.
- * // Convert the date with locale's options.
- * const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456), {
- * locale: 'ko-KR',
- * })
- * //=> 2019. 10. 4.
- *
- * @example
- * // Represent 10 October 2019 in middle-endian format:
- * const result = intlFormat(new Date(2019, 9, 4, 12, 30, 13, 456))
- * //=> 10/4/2019
- */
-function intlFormat(date, formatOrLocale, localeOptions) {
- var _localeOptions;
- (0, _index.default)(1, arguments);
- var formatOptions;
- if (isFormatOptions(formatOrLocale)) {
- formatOptions = formatOrLocale;
- } else {
- localeOptions = formatOrLocale;
- }
- return new Intl.DateTimeFormat((_localeOptions = localeOptions) === null || _localeOptions === void 0 ? void 0 : _localeOptions.locale, formatOptions).format(date);
-}
-function isFormatOptions(opts) {
- return opts !== undefined && !('locale' in opts);
-}
-module.exports = exports.default; \ No newline at end of file
diff --git a/node_modules/date-fns/intlFormat/index.js.flow b/node_modules/date-fns/intlFormat/index.js.flow
deleted file mode 100644
index adc0bb4..0000000
--- a/node_modules/date-fns/intlFormat/index.js.flow
+++ /dev/null
@@ -1,72 +0,0 @@
-// @flow
-// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
-
-export type Interval = {
- start: Date | number,
- end: Date | number,
-}
-
-export type Locale = {
- code?: string,
- formatDistance?: (...args: Array<any>) => any,
- formatRelative?: (...args: Array<any>) => any,
- localize?: {
- ordinalNumber: (...args: Array<any>) => any,
- era: (...args: Array<any>) => any,
- quarter: (...args: Array<any>) => any,
- month: (...args: Array<any>) => any,
- day: (...args: Array<any>) => any,
- dayPeriod: (...args: Array<any>) => any,
- },
- formatLong?: {
- date: (...args: Array<any>) => any,
- time: (...args: Array<any>) => any,
- dateTime: (...args: Array<any>) => any,
- },
- match?: {
- ordinalNumber: (...args: Array<any>) => any,
- era: (...args: Array<any>) => any,
- quarter: (...args: Array<any>) => any,
- month: (...args: Array<any>) => any,
- day: (...args: Array<any>) => any,
- dayPeriod: (...args: Array<any>) => any,
- },
- options?: {
- weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6,
- firstWeekContainsDate?: 1 | 2 | 3 | 4 | 5 | 6 | 7,
- },
-}
-
-export type Duration = {
- years?: number,
- months?: number,
- weeks?: number,
- days?: number,
- hours?: number,
- minutes?: number,
- seconds?: number,
-}
-
-export type Day = 0 | 1 | 2 | 3 | 4 | 5 | 6
-
-declare module.exports: (
- argument: Date | number,
- formatOptions?: {
- localeMatcher?: 'lookup' | 'best fit',
- weekday?: 'narrow' | 'short' | 'long',
- era?: 'narrow' | 'short' | 'long',
- year?: 'numeric' | '2-digit',
- month?: 'numeric' | '2-digit' | 'narrow' | 'short' | 'long',
- day?: 'numeric' | '2-digit',
- hour?: 'numeric' | '2-digit',
- minute?: 'numeric' | '2-digit',
- second?: 'numeric' | '2-digit',
- timeZoneName?: 'short' | 'long',
- formatMatcher?: 'basic' | 'best fit',
- hour12?: boolean,
- timeZone?: string,
- },
- localeOptions?: {
- locale?: string | string[],
- }
-) => string
diff --git a/node_modules/date-fns/intlFormat/package.json b/node_modules/date-fns/intlFormat/package.json
deleted file mode 100644
index 91c0bb5..0000000
--- a/node_modules/date-fns/intlFormat/package.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "sideEffects": false,
- "module": "../esm/intlFormat/index.js",
- "typings": "../typings.d.ts"
-} \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage