diff options
Diffstat (limited to 'date-fns/src/locale/it')
-rw-r--r-- | date-fns/src/locale/it/_lib/formatDistance/index.js | 101 | ||||
-rw-r--r-- | date-fns/src/locale/it/_lib/formatLong/index.js | 41 | ||||
-rw-r--r-- | date-fns/src/locale/it/_lib/formatRelative/index.js | 66 | ||||
-rw-r--r-- | date-fns/src/locale/it/_lib/localize/index.js | 166 | ||||
-rw-r--r-- | date-fns/src/locale/it/_lib/match/index.js | 137 | ||||
-rw-r--r-- | date-fns/src/locale/it/index.d.ts | 4 | ||||
-rw-r--r-- | date-fns/src/locale/it/index.js | 30 | ||||
-rw-r--r-- | date-fns/src/locale/it/index.js.flow | 35 | ||||
-rw-r--r-- | date-fns/src/locale/it/snapshot.md | 304 |
9 files changed, 884 insertions, 0 deletions
diff --git a/date-fns/src/locale/it/_lib/formatDistance/index.js b/date-fns/src/locale/it/_lib/formatDistance/index.js new file mode 100644 index 0000000..be8b937 --- /dev/null +++ b/date-fns/src/locale/it/_lib/formatDistance/index.js @@ -0,0 +1,101 @@ +var formatDistanceLocale = { + lessThanXSeconds: { + one: 'meno di un secondo', + other: 'meno di {{count}} secondi' + }, + + xSeconds: { + one: 'un secondo', + other: '{{count}} secondi' + }, + + halfAMinute: 'alcuni secondi', + + lessThanXMinutes: { + one: 'meno di un minuto', + other: 'meno di {{count}} minuti' + }, + + xMinutes: { + one: 'un minuto', + other: '{{count}} minuti' + }, + + aboutXHours: { + one: "circa un'ora", + other: 'circa {{count}} ore' + }, + + xHours: { + one: "un'ora", + other: '{{count}} ore' + }, + + xDays: { + one: 'un giorno', + other: '{{count}} giorni' + }, + + aboutXWeeks: { + one: 'circa una settimana', + other: 'circa {{count}} settimane' + }, + + xWeeks: { + one: 'una settimana', + other: '{{count}} settimane' + }, + + aboutXMonths: { + one: 'circa un mese', + other: 'circa {{count}} mesi' + }, + + xMonths: { + one: 'un mese', + other: '{{count}} mesi' + }, + + aboutXYears: { + one: 'circa un anno', + other: 'circa {{count}} anni' + }, + + xYears: { + one: 'un anno', + other: '{{count}} anni' + }, + + overXYears: { + one: 'più di un anno', + other: 'più di {{count}} anni' + }, + + almostXYears: { + one: 'quasi un anno', + other: 'quasi {{count}} anni' + } +} + +export default function formatDistance(token, count, options) { + options = options || {} + + var result + if (typeof formatDistanceLocale[token] === 'string') { + result = formatDistanceLocale[token] + } else if (count === 1) { + result = formatDistanceLocale[token].one + } else { + result = formatDistanceLocale[token].other.replace('{{count}}', count) + } + + if (options.addSuffix) { + if (options.comparison > 0) { + return 'tra ' + result + } else { + return result + ' fa' + } + } + + return result +} diff --git a/date-fns/src/locale/it/_lib/formatLong/index.js b/date-fns/src/locale/it/_lib/formatLong/index.js new file mode 100644 index 0000000..6a45204 --- /dev/null +++ b/date-fns/src/locale/it/_lib/formatLong/index.js @@ -0,0 +1,41 @@ +import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index' + +var dateFormats = { + full: 'EEEE d MMMM y', + long: 'd MMMM y', + medium: 'd MMM y', + short: 'dd/MM/y' +} + +var timeFormats = { + full: 'HH:mm:ss zzzz', + long: 'HH:mm:ss z', + medium: 'HH:mm:ss', + short: 'HH:mm' +} + +var dateTimeFormats = { + full: '{{date}} {{time}}', + long: '{{date}} {{time}}', + medium: '{{date}} {{time}}', + short: '{{date}} {{time}}' +} + +var formatLong = { + date: buildFormatLongFn({ + formats: dateFormats, + defaultWidth: 'full' + }), + + time: buildFormatLongFn({ + formats: timeFormats, + defaultWidth: 'full' + }), + + dateTime: buildFormatLongFn({ + formats: dateTimeFormats, + defaultWidth: 'full' + }) +} + +export default formatLong diff --git a/date-fns/src/locale/it/_lib/formatRelative/index.js b/date-fns/src/locale/it/_lib/formatRelative/index.js new file mode 100644 index 0000000..7258059 --- /dev/null +++ b/date-fns/src/locale/it/_lib/formatRelative/index.js @@ -0,0 +1,66 @@ +import isSameUTCWeek from '../../../../_lib/isSameUTCWeek/index' + +var weekdays = [ + 'domenica', + 'lunedì', + 'martedì', + 'mercoledì', + 'giovedì', + 'venerdì', + 'sabato' +] + +function lastWeek(day) { + switch (day) { + case 0: + return "'domenica scorsa alle' p" + default: + return "'" + weekdays[day] + " scorso alle' p" + } +} + +function thisWeek(day) { + return "'" + weekdays[day] + " alle' p" +} + +function nextWeek(day) { + switch (day) { + case 0: + return "'domenica prossima alle' p" + default: + return "'" + weekdays[day] + " prossimo alle' p" + } +} + +var formatRelativeLocale = { + lastWeek: function(date, baseDate, options) { + var day = date.getUTCDay() + if (isSameUTCWeek(date, baseDate, options)) { + return thisWeek(day) + } else { + return lastWeek(day) + } + }, + yesterday: "'ieri alle' p", + today: "'oggi alle' p", + tomorrow: "'domani alle' p", + nextWeek: function(date, baseDate, options) { + var day = date.getUTCDay() + if (isSameUTCWeek(date, baseDate, options)) { + return thisWeek(day) + } else { + return nextWeek(day) + } + }, + other: 'P' +} + +export default function formatRelative(token, date, baseDate, options) { + var format = formatRelativeLocale[token] + + if (typeof format === 'function') { + return format(date, baseDate, options) + } + + return format +} diff --git a/date-fns/src/locale/it/_lib/localize/index.js b/date-fns/src/locale/it/_lib/localize/index.js new file mode 100644 index 0000000..2707f5c --- /dev/null +++ b/date-fns/src/locale/it/_lib/localize/index.js @@ -0,0 +1,166 @@ +import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index' + +var eraValues = { + narrow: ['aC', 'dC'], + abbreviated: ['a.C.', 'd.C.'], + wide: ['avanti Cristo', 'dopo Cristo'] +} + +var quarterValues = { + narrow: ['1', '2', '3', '4'], + abbreviated: ['T1', 'T2', 'T3', 'T4'], + wide: ['1º trimestre', '2º trimestre', '3º trimestre', '4º trimestre'] +} + +var monthValues = { + narrow: ['G', 'F', 'M', 'A', 'M', 'G', 'L', 'A', 'S', 'O', 'N', 'D'], + abbreviated: [ + 'gen', + 'feb', + 'mar', + 'apr', + 'mag', + 'giu', + 'lug', + 'ago', + 'set', + 'ott', + 'nov', + 'dic' + ], + wide: [ + 'gennaio', + 'febbraio', + 'marzo', + 'aprile', + 'maggio', + 'giugno', + 'luglio', + 'agosto', + 'settembre', + 'ottobre', + 'novembre', + 'dicembre' + ] +} + +var dayValues = { + narrow: ['D', 'L', 'M', 'M', 'G', 'V', 'S'], + short: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'], + abbreviated: ['dom', 'lun', 'mar', 'mer', 'gio', 'ven', 'sab'], + wide: [ + 'domenica', + 'lunedì', + 'martedì', + 'mercoledì', + 'giovedì', + 'venerdì', + 'sabato' + ] +} + +var dayPeriodValues = { + narrow: { + am: 'm.', + pm: 'p.', + midnight: 'mezzanotte', + noon: 'mezzogiorno', + morning: 'mattina', + afternoon: 'pomeriggio', + evening: 'sera', + night: 'notte' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'mezzanotte', + noon: 'mezzogiorno', + morning: 'mattina', + afternoon: 'pomeriggio', + evening: 'sera', + night: 'notte' + }, + wide: { + am: 'AM', + pm: 'PM', + midnight: 'mezzanotte', + noon: 'mezzogiorno', + morning: 'mattina', + afternoon: 'pomeriggio', + evening: 'sera', + night: 'notte' + } +} +var formattingDayPeriodValues = { + narrow: { + am: 'm.', + pm: 'p.', + midnight: 'mezzanotte', + noon: 'mezzogiorno', + morning: 'di mattina', + afternoon: 'del pomeriggio', + evening: 'di sera', + night: 'di notte' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'mezzanotte', + noon: 'mezzogiorno', + morning: 'di mattina', + afternoon: 'del pomeriggio', + evening: 'di sera', + night: 'di notte' + }, + wide: { + am: 'AM', + pm: 'PM', + midnight: 'mezzanotte', + noon: 'mezzogiorno', + morning: 'di mattina', + afternoon: 'del pomeriggio', + evening: 'di sera', + night: 'di notte' + } +} + +function ordinalNumber(dirtyNumber) { + var number = Number(dirtyNumber) + return number + 'º' +} + +var localize = { + ordinalNumber: ordinalNumber, + + era: buildLocalizeFn({ + values: eraValues, + defaultWidth: 'wide' + }), + + quarter: buildLocalizeFn({ + values: quarterValues, + defaultWidth: 'wide', + argumentCallback: function(quarter) { + return Number(quarter) - 1 + } + }), + + month: buildLocalizeFn({ + values: monthValues, + defaultWidth: 'wide' + }), + + day: buildLocalizeFn({ + values: dayValues, + defaultWidth: 'wide' + }), + + dayPeriod: buildLocalizeFn({ + values: dayPeriodValues, + defaultWidth: 'wide', + formattingValues: formattingDayPeriodValues, + defaultFormattingWidth: 'wide' + }) +} + +export default localize diff --git a/date-fns/src/locale/it/_lib/match/index.js b/date-fns/src/locale/it/_lib/match/index.js new file mode 100644 index 0000000..fa4e057 --- /dev/null +++ b/date-fns/src/locale/it/_lib/match/index.js @@ -0,0 +1,137 @@ +import buildMatchPatternFn from '../../../_lib/buildMatchPatternFn/index' +import buildMatchFn from '../../../_lib/buildMatchFn/index' + +var matchOrdinalNumberPattern = /^(\d+)(º)?/i +var parseOrdinalNumberPattern = /\d+/i + +var matchEraPatterns = { + narrow: /^(aC|dC)/i, + abbreviated: /^(a\.?\s?C\.?|a\.?\s?e\.?\s?v\.?|d\.?\s?C\.?|e\.?\s?v\.?)/i, + wide: /^(avanti Cristo|avanti Era Volgare|dopo Cristo|Era Volgare)/i +} +var parseEraPatterns = { + any: [/^a/i, /^(d|e)/i] +} + +var matchQuarterPatterns = { + narrow: /^[1234]/i, + abbreviated: /^t[1234]/i, + wide: /^[1234](º)? trimestre/i +} +var parseQuarterPatterns = { + any: [/1/i, /2/i, /3/i, /4/i] +} + +var matchMonthPatterns = { + narrow: /^[gfmalsond]/i, + abbreviated: /^(gen|feb|mar|apr|mag|giu|lug|ago|set|ott|nov|dic)/i, + wide: /^(gennaio|febbraio|marzo|aprile|maggio|giugno|luglio|agosto|settembre|ottobre|novembre|dicembre)/i +} +var parseMonthPatterns = { + narrow: [ + /^g/i, + /^f/i, + /^m/i, + /^a/i, + /^m/i, + /^g/i, + /^l/i, + /^a/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ], + any: [ + /^ge/i, + /^f/i, + /^mar/i, + /^ap/i, + /^mag/i, + /^gi/i, + /^l/i, + /^ag/i, + /^s/i, + /^o/i, + /^n/i, + /^d/i + ] +} + +var matchDayPatterns = { + narrow: /^[dlmgvs]/i, + short: /^(do|lu|ma|me|gi|ve|sa)/i, + abbreviated: /^(dom|lun|mar|mer|gio|ven|sab)/i, + wide: /^(domenica|luned[i|ì]|marted[i|ì]|mercoled[i|ì]|gioved[i|ì]|venerd[i|ì]|sabato)/i +} +var parseDayPatterns = { + narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^g/i, /^v/i, /^s/i], + any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^g/i, /^v/i, /^s/i] +} + +var matchDayPeriodPatterns = { + narrow: /^(a|m\.|p|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i, + any: /^([ap]\.?\s?m\.?|mezzanotte|mezzogiorno|(di|del) (mattina|pomeriggio|sera|notte))/i +} +var parseDayPeriodPatterns = { + any: { + am: /^a/i, + pm: /^p/i, + midnight: /^mezza/i, + noon: /^mezzo/i, + morning: /mattina/i, + afternoon: /pomeriggio/i, + evening: /sera/i, + night: /notte/i + } +} + +var match = { + ordinalNumber: buildMatchPatternFn({ + matchPattern: matchOrdinalNumberPattern, + parsePattern: parseOrdinalNumberPattern, + valueCallback: function(value) { + return parseInt(value, 10) + } + }), + + era: buildMatchFn({ + matchPatterns: matchEraPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseEraPatterns, + defaultParseWidth: 'any' + }), + + quarter: buildMatchFn({ + matchPatterns: matchQuarterPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseQuarterPatterns, + defaultParseWidth: 'any', + valueCallback: function(index) { + return index + 1 + } + }), + + month: buildMatchFn({ + matchPatterns: matchMonthPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseMonthPatterns, + defaultParseWidth: 'any' + }), + + day: buildMatchFn({ + matchPatterns: matchDayPatterns, + defaultMatchWidth: 'wide', + parsePatterns: parseDayPatterns, + defaultParseWidth: 'any' + }), + + dayPeriod: buildMatchFn({ + matchPatterns: matchDayPeriodPatterns, + defaultMatchWidth: 'any', + parsePatterns: parseDayPeriodPatterns, + defaultParseWidth: 'any' + }) +} + +export default match diff --git a/date-fns/src/locale/it/index.d.ts b/date-fns/src/locale/it/index.d.ts new file mode 100644 index 0000000..6e0422e --- /dev/null +++ b/date-fns/src/locale/it/index.d.ts @@ -0,0 +1,4 @@ +// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. + +import { it } from 'date-fns/locale' +export default it diff --git a/date-fns/src/locale/it/index.js b/date-fns/src/locale/it/index.js new file mode 100644 index 0000000..b7aeec0 --- /dev/null +++ b/date-fns/src/locale/it/index.js @@ -0,0 +1,30 @@ +import formatDistance from './_lib/formatDistance/index' +import formatLong from './_lib/formatLong/index' +import formatRelative from './_lib/formatRelative/index' +import localize from './_lib/localize/index' +import match from './_lib/match/index' + +/** + * @type {Locale} + * @category Locales + * @summary Italian locale. + * @language Italian + * @iso-639-2 ita + * @author Alberto Restifo [@albertorestifo]{@link https://github.com/albertorestifo} + * @author Giovanni Polimeni [@giofilo]{@link https://github.com/giofilo} + * @author Vincenzo Carrese [@vin-car]{@link https://github.com/vin-car} + */ +var locale = { + code: 'it', + formatDistance: formatDistance, + formatLong: formatLong, + formatRelative: formatRelative, + localize: localize, + match: match, + options: { + weekStartsOn: 1 /* Monday */, + firstWeekContainsDate: 4 + } +} + +export default locale diff --git a/date-fns/src/locale/it/index.js.flow b/date-fns/src/locale/it/index.js.flow new file mode 100644 index 0000000..b9dfe66 --- /dev/null +++ b/date-fns/src/locale/it/index.js.flow @@ -0,0 +1,35 @@ +// @flow +// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. + +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, + }, +} + +declare module.exports: Locale diff --git a/date-fns/src/locale/it/snapshot.md b/date-fns/src/locale/it/snapshot.md new file mode 100644 index 0000000..53f0aea --- /dev/null +++ b/date-fns/src/locale/it/snapshot.md @@ -0,0 +1,304 @@ +# Italian (it) locale + +## `format` and `parse` + +| Title | Token string | Date | `format` result | `parse` result | +| ------------------------------- | ------------ | ------------------------ | --------------------------------------------- | ------------------------ | +| Calendar year | yo | 1987-02-11T12:13:14.015Z | 1987º | 1987-01-01T00:00:00.000Z | +| | | 0005-01-01T12:13:14.015Z | 5º | 0005-01-01T00:00:00.000Z | +| Local week-numbering year | Yo | 1987-02-11T12:13:14.015Z | 1987º | 1986-12-29T00:00:00.000Z | +| | | 0005-01-01T12:13:14.015Z | 4º | 0003-12-29T00:00:00.000Z | +| Quarter (formatting) | Qo | 2019-01-01T12:13:14.015Z | 1º | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | 2º | 2019-04-01T00:00:00.000Z | +| | QQQ | 2019-01-01T12:13:14.015Z | T1 | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | T2 | 2019-04-01T00:00:00.000Z | +| | QQQQ | 2019-01-01T12:13:14.015Z | 1º trimestre | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | 2º trimestre | 2019-04-01T00:00:00.000Z | +| | QQQQQ | 2019-01-01T12:13:14.015Z | 1 | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | 2 | 2019-04-01T00:00:00.000Z | +| Quarter (stand-alone) | qo | 2019-01-01T12:13:14.015Z | 1º | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | 2º | 2019-04-01T00:00:00.000Z | +| | qqq | 2019-01-01T12:13:14.015Z | T1 | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | T2 | 2019-04-01T00:00:00.000Z | +| | qqqq | 2019-01-01T12:13:14.015Z | 1º trimestre | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | 2º trimestre | 2019-04-01T00:00:00.000Z | +| Month (formatting) | Mo | 2019-02-11T12:13:14.015Z | 2º | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | 7º | 2019-07-01T00:00:00.000Z | +| | MMM | 2019-02-11T12:13:14.015Z | feb | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | lug | 2019-07-01T00:00:00.000Z | +| | MMMM | 2019-02-11T12:13:14.015Z | febbraio | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | luglio | 2019-07-01T00:00:00.000Z | +| | MMMMM | 2019-02-11T12:13:14.015Z | F | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | L | 2019-07-01T00:00:00.000Z | +| Month (stand-alone) | Lo | 2019-02-11T12:13:14.015Z | 2º | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | 7º | 2019-07-01T00:00:00.000Z | +| | LLL | 2019-02-11T12:13:14.015Z | feb | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | lug | 2019-07-01T00:00:00.000Z | +| | LLLL | 2019-02-11T12:13:14.015Z | febbraio | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | luglio | 2019-07-01T00:00:00.000Z | +| | LLLLL | 2019-02-11T12:13:14.015Z | F | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | L | 2019-07-01T00:00:00.000Z | +| Local week of year | wo | 2019-01-01T12:13:14.015Z | 1º | 2018-12-31T00:00:00.000Z | +| | | 2019-12-01T12:13:14.015Z | 48º | 2019-11-25T00:00:00.000Z | +| ISO week of year | Io | 2019-01-01T12:13:14.015Z | 1º | 2018-12-31T00:00:00.000Z | +| | | 2019-12-01T12:13:14.015Z | 48º | 2019-11-25T00:00:00.000Z | +| Day of month | do | 2019-02-11T12:13:14.015Z | 11º | 2019-02-11T00:00:00.000Z | +| | | 2019-02-28T12:13:14.015Z | 28º | 2019-02-28T00:00:00.000Z | +| Day of year | Do | 2019-02-11T12:13:14.015Z | 42º | 2019-02-11T00:00:00.000Z | +| | | 2019-12-31T12:13:14.015Z | 365º | 2019-12-31T00:00:00.000Z | +| Day of week (formatting) | E | 2019-02-11T12:13:14.015Z | lun | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | ven | 2019-02-15T00:00:00.000Z | +| | EE | 2019-02-11T12:13:14.015Z | lun | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | ven | 2019-02-15T00:00:00.000Z | +| | EEE | 2019-02-11T12:13:14.015Z | lun | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | ven | 2019-02-15T00:00:00.000Z | +| | EEEE | 2019-02-11T12:13:14.015Z | lunedì | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | venerdì | 2019-02-15T00:00:00.000Z | +| | EEEEE | 2019-02-11T12:13:14.015Z | L | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | V | 2019-02-15T00:00:00.000Z | +| | EEEEEE | 2019-02-11T12:13:14.015Z | lun | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | ven | Invalid Date | +| ISO day of week (formatting) | io | 2019-02-11T12:13:14.015Z | 1º | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | 5º | 2019-02-15T00:00:00.000Z | +| | iii | 2019-02-11T12:13:14.015Z | lun | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | ven | 2019-02-15T00:00:00.000Z | +| | iiii | 2019-02-11T12:13:14.015Z | lunedì | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | venerdì | 2019-02-15T00:00:00.000Z | +| | iiiii | 2019-02-11T12:13:14.015Z | L | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | V | 2019-02-15T00:00:00.000Z | +| | iiiiii | 2019-02-11T12:13:14.015Z | lun | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | ven | Invalid Date | +| Local day of week (formatting) | eo | 2019-02-11T12:13:14.015Z | 1º | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | 5º | 2019-02-15T00:00:00.000Z | +| | eee | 2019-02-11T12:13:14.015Z | lun | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | ven | 2019-02-15T00:00:00.000Z | +| | eeee | 2019-02-11T12:13:14.015Z | lunedì | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | venerdì | 2019-02-15T00:00:00.000Z | +| | eeeee | 2019-02-11T12:13:14.015Z | L | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | V | 2019-02-15T00:00:00.000Z | +| | eeeeee | 2019-02-11T12:13:14.015Z | lun | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | ven | Invalid Date | +| Local day of week (stand-alone) | co | 2019-02-11T12:13:14.015Z | 1º | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | 5º | 2019-02-15T00:00:00.000Z | +| | ccc | 2019-02-11T12:13:14.015Z | lun | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | ven | 2019-02-15T00:00:00.000Z | +| | cccc | 2019-02-11T12:13:14.015Z | lunedì | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | venerdì | 2019-02-15T00:00:00.000Z | +| | ccccc | 2019-02-11T12:13:14.015Z | L | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | V | 2019-02-15T00:00:00.000Z | +| | cccccc | 2019-02-11T12:13:14.015Z | lun | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | ven | Invalid Date | +| AM, PM | a | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | aa | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | aaa | 2019-02-11T11:13:14.015Z | am | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | pm | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | pm | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | am | 2019-02-11T00:00:00.000Z | +| | aaaa | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | aaaaa | 2019-02-11T11:13:14.015Z | m. | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | p. | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | p. | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | m. | 2019-02-11T00:00:00.000Z | +| AM, PM, noon, midnight | b | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | bb | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | bbb | 2019-02-11T11:13:14.015Z | am | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | pm | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | pm | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | am | 2019-02-11T00:00:00.000Z | +| | bbbb | 2019-02-11T11:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | PM | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | AM | 2019-02-11T00:00:00.000Z | +| | bbbbb | 2019-02-11T11:13:14.015Z | m. | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | p. | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | p. | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | m. | 2019-02-11T00:00:00.000Z | +| Flexible day period | B | 2019-02-11T11:13:14.015Z | di mattina | 2019-02-11T04:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | del pomeriggio | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | di sera | 2019-02-11T17:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | di notte | 2019-02-11T00:00:00.000Z | +| | BB | 2019-02-11T11:13:14.015Z | di mattina | 2019-02-11T04:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | del pomeriggio | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | di sera | 2019-02-11T17:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | di notte | 2019-02-11T00:00:00.000Z | +| | BBB | 2019-02-11T11:13:14.015Z | di mattina | 2019-02-11T04:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | del pomeriggio | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | di sera | 2019-02-11T17:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | di notte | 2019-02-11T00:00:00.000Z | +| | BBBB | 2019-02-11T11:13:14.015Z | di mattina | 2019-02-11T04:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | del pomeriggio | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | di sera | 2019-02-11T17:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | di notte | 2019-02-11T00:00:00.000Z | +| | BBBBB | 2019-02-11T11:13:14.015Z | di mattina | 2019-02-11T04:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | del pomeriggio | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | di sera | 2019-02-11T17:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | di notte | 2019-02-11T00:00:00.000Z | +| Hour [1-12] | ho | 2019-02-11T11:13:14.015Z | 11º | 2019-02-11T11:00:00.000Z | +| | | 2019-02-11T23:13:14.015Z | 11º | 2019-02-11T23:00:00.000Z | +| Hour [0-23] | Ho | 2019-02-11T11:13:14.015Z | 11º | 2019-02-11T11:00:00.000Z | +| | | 2019-02-11T23:13:14.015Z | 23º | 2019-02-11T23:00:00.000Z | +| Hour [0-11] | Ko | 2019-02-11T11:13:14.015Z | 11º | 2019-02-11T11:00:00.000Z | +| | | 2019-02-11T23:13:14.015Z | 11º | 2019-02-11T23:00:00.000Z | +| Hour [1-24] | ko | 2019-02-11T11:13:14.015Z | 11º | 2019-02-11T11:00:00.000Z | +| | | 2019-02-11T23:13:14.015Z | 23º | 2019-02-11T23:00:00.000Z | +| Minute | mo | 2019-01-01T12:01:14.015Z | 1º | 2019-01-01T12:01:00.000Z | +| | | 2019-04-01T12:55:14.015Z | 55º | 2019-04-01T12:55:00.000Z | +| Second | so | 2019-01-01T12:13:01.015Z | 1º | 2019-01-01T12:13:01.000Z | +| | | 2019-04-01T12:13:55.015Z | 55º | 2019-04-01T12:13:55.000Z | +| Long localized date | P | 1987-02-11T12:13:14.015Z | 11/02/1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | 29/05/1453 | 1453-05-29T00:00:00.000Z | +| | PP | 1987-02-11T12:13:14.015Z | 11 feb 1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | 29 mag 1453 | 1453-05-29T00:00:00.000Z | +| | PPP | 1987-02-11T12:13:14.015Z | 11 febbraio 1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | 29 maggio 1453 | 1453-05-29T00:00:00.000Z | +| | PPPP | 1987-02-11T12:13:14.015Z | mercoledì 11 febbraio 1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | domenica 29 maggio 1453 | 1453-05-29T00:00:00.000Z | +| Long localized time | p | 1987-02-11T12:13:14.015Z | 12:13 | 1987-02-11T12:13:00.000Z | +| | | 1453-05-29T23:59:59.999Z | 23:59 | 1453-05-29T23:59:00.000Z | +| | pp | 1987-02-11T12:13:14.015Z | 12:13:14 | 1987-02-11T12:13:14.000Z | +| | | 1453-05-29T23:59:59.999Z | 23:59:59 | 1453-05-29T23:59:59.000Z | +| | ppp | 1987-02-11T12:13:14.015Z | 12:13:14 GMT+0 | Errored | +| | | 1453-05-29T23:59:59.999Z | 23:59:59 GMT+0 | Errored | +| | pppp | 1987-02-11T12:13:14.015Z | 12:13:14 GMT+00:00 | Errored | +| | | 1453-05-29T23:59:59.999Z | 23:59:59 GMT+00:00 | Errored | +| Combination of date and time | Pp | 1987-02-11T12:13:14.015Z | 11/02/1987 12:13 | 1987-02-11T12:13:00.000Z | +| | | 1453-05-29T23:59:59.999Z | 29/05/1453 23:59 | 1453-05-29T23:59:00.000Z | +| | PPpp | 1987-02-11T12:13:14.015Z | 11 feb 1987 12:13:14 | 1987-02-11T12:13:14.000Z | +| | | 1453-05-29T23:59:59.999Z | 29 mag 1453 23:59:59 | 1453-05-29T23:59:59.000Z | +| | PPPppp | 1987-02-11T12:13:14.015Z | 11 febbraio 1987 12:13:14 GMT+0 | Errored | +| | | 1453-05-29T23:59:59.999Z | 29 maggio 1453 23:59:59 GMT+0 | Errored | +| | PPPPpppp | 1987-02-11T12:13:14.015Z | mercoledì 11 febbraio 1987 12:13:14 GMT+00:00 | Errored | +| | | 1453-05-29T23:59:59.999Z | domenica 29 maggio 1453 23:59:59 GMT+00:00 | Errored | + +## `formatDistance` + +If now is January 1st, 2000, 00:00. + +| Date | Result | `includeSeconds: true` | `addSuffix: true` | +| ------------------------ | ----------------- | ---------------------- | --------------------- | +| 2006-01-01T00:00:00.000Z | circa 6 anni | circa 6 anni | tra circa 6 anni | +| 2005-01-01T00:00:00.000Z | circa 5 anni | circa 5 anni | tra circa 5 anni | +| 2004-01-01T00:00:00.000Z | circa 4 anni | circa 4 anni | tra circa 4 anni | +| 2003-01-01T00:00:00.000Z | circa 3 anni | circa 3 anni | tra circa 3 anni | +| 2002-01-01T00:00:00.000Z | circa 2 anni | circa 2 anni | tra circa 2 anni | +| 2001-06-01T00:00:00.000Z | più di un anno | più di un anno | tra più di un anno | +| 2001-02-01T00:00:00.000Z | circa un anno | circa un anno | tra circa un anno | +| 2001-01-01T00:00:00.000Z | circa un anno | circa un anno | tra circa un anno | +| 2000-06-01T00:00:00.000Z | 5 mesi | 5 mesi | tra 5 mesi | +| 2000-03-01T00:00:00.000Z | 2 mesi | 2 mesi | tra 2 mesi | +| 2000-02-01T00:00:00.000Z | circa un mese | circa un mese | tra circa un mese | +| 2000-01-15T00:00:00.000Z | 14 giorni | 14 giorni | tra 14 giorni | +| 2000-01-02T00:00:00.000Z | un giorno | un giorno | tra un giorno | +| 2000-01-01T06:00:00.000Z | circa 6 ore | circa 6 ore | tra circa 6 ore | +| 2000-01-01T01:00:00.000Z | circa un'ora | circa un'ora | tra circa un'ora | +| 2000-01-01T00:45:00.000Z | circa un'ora | circa un'ora | tra circa un'ora | +| 2000-01-01T00:30:00.000Z | 30 minuti | 30 minuti | tra 30 minuti | +| 2000-01-01T00:15:00.000Z | 15 minuti | 15 minuti | tra 15 minuti | +| 2000-01-01T00:01:00.000Z | un minuto | un minuto | tra un minuto | +| 2000-01-01T00:00:25.000Z | meno di un minuto | alcuni secondi | tra meno di un minuto | +| 2000-01-01T00:00:15.000Z | meno di un minuto | meno di 20 secondi | tra meno di un minuto | +| 2000-01-01T00:00:05.000Z | meno di un minuto | meno di 10 secondi | tra meno di un minuto | +| 2000-01-01T00:00:00.000Z | meno di un minuto | meno di 5 secondi | meno di un minuto fa | +| 1999-12-31T23:59:55.000Z | meno di un minuto | meno di 10 secondi | meno di un minuto fa | +| 1999-12-31T23:59:45.000Z | meno di un minuto | meno di 20 secondi | meno di un minuto fa | +| 1999-12-31T23:59:35.000Z | meno di un minuto | alcuni secondi | meno di un minuto fa | +| 1999-12-31T23:59:00.000Z | un minuto | un minuto | un minuto fa | +| 1999-12-31T23:45:00.000Z | 15 minuti | 15 minuti | 15 minuti fa | +| 1999-12-31T23:30:00.000Z | 30 minuti | 30 minuti | 30 minuti fa | +| 1999-12-31T23:15:00.000Z | circa un'ora | circa un'ora | circa un'ora fa | +| 1999-12-31T23:00:00.000Z | circa un'ora | circa un'ora | circa un'ora fa | +| 1999-12-31T18:00:00.000Z | circa 6 ore | circa 6 ore | circa 6 ore fa | +| 1999-12-30T00:00:00.000Z | 2 giorni | 2 giorni | 2 giorni fa | +| 1999-12-15T00:00:00.000Z | 17 giorni | 17 giorni | 17 giorni fa | +| 1999-12-01T00:00:00.000Z | circa un mese | circa un mese | circa un mese fa | +| 1999-11-01T00:00:00.000Z | 2 mesi | 2 mesi | 2 mesi fa | +| 1999-06-01T00:00:00.000Z | 7 mesi | 7 mesi | 7 mesi fa | +| 1999-01-01T00:00:00.000Z | circa un anno | circa un anno | circa un anno fa | +| 1998-12-01T00:00:00.000Z | circa un anno | circa un anno | circa un anno fa | +| 1998-06-01T00:00:00.000Z | più di un anno | più di un anno | più di un anno fa | +| 1998-01-01T00:00:00.000Z | circa 2 anni | circa 2 anni | circa 2 anni fa | +| 1997-01-01T00:00:00.000Z | circa 3 anni | circa 3 anni | circa 3 anni fa | +| 1996-01-01T00:00:00.000Z | circa 4 anni | circa 4 anni | circa 4 anni fa | +| 1995-01-01T00:00:00.000Z | circa 5 anni | circa 5 anni | circa 5 anni fa | +| 1994-01-01T00:00:00.000Z | circa 6 anni | circa 6 anni | circa 6 anni fa | + +## `formatDistanceStrict` + +If now is January 1st, 2000, 00:00. + +| Date | Result | `addSuffix: true` | With forced unit (i.e. `hour`) | +| ------------------------ | ---------- | ----------------- | ------------------------------ | +| 2006-01-01T00:00:00.000Z | 6 anni | tra 6 anni | 52608 ore | +| 2005-01-01T00:00:00.000Z | 5 anni | tra 5 anni | 43848 ore | +| 2004-01-01T00:00:00.000Z | 4 anni | tra 4 anni | 35064 ore | +| 2003-01-01T00:00:00.000Z | 3 anni | tra 3 anni | 26304 ore | +| 2002-01-01T00:00:00.000Z | 2 anni | tra 2 anni | 17544 ore | +| 2001-06-01T00:00:00.000Z | un anno | tra un anno | 12408 ore | +| 2001-02-01T00:00:00.000Z | un anno | tra un anno | 9528 ore | +| 2001-01-01T00:00:00.000Z | un anno | tra un anno | 8784 ore | +| 2000-06-01T00:00:00.000Z | 5 mesi | tra 5 mesi | 3648 ore | +| 2000-03-01T00:00:00.000Z | 2 mesi | tra 2 mesi | 1440 ore | +| 2000-02-01T00:00:00.000Z | un mese | tra un mese | 744 ore | +| 2000-01-15T00:00:00.000Z | 14 giorni | tra 14 giorni | 336 ore | +| 2000-01-02T00:00:00.000Z | un giorno | tra un giorno | 24 ore | +| 2000-01-01T06:00:00.000Z | 6 ore | tra 6 ore | 6 ore | +| 2000-01-01T01:00:00.000Z | un'ora | tra un'ora | un'ora | +| 2000-01-01T00:45:00.000Z | 45 minuti | tra 45 minuti | un'ora | +| 2000-01-01T00:30:00.000Z | 30 minuti | tra 30 minuti | un'ora | +| 2000-01-01T00:15:00.000Z | 15 minuti | tra 15 minuti | 0 ore | +| 2000-01-01T00:01:00.000Z | un minuto | tra un minuto | 0 ore | +| 2000-01-01T00:00:25.000Z | 25 secondi | tra 25 secondi | 0 ore | +| 2000-01-01T00:00:15.000Z | 15 secondi | tra 15 secondi | 0 ore | +| 2000-01-01T00:00:05.000Z | 5 secondi | tra 5 secondi | 0 ore | +| 2000-01-01T00:00:00.000Z | 0 secondi | 0 secondi fa | 0 ore | +| 1999-12-31T23:59:55.000Z | 5 secondi | 5 secondi fa | 0 ore | +| 1999-12-31T23:59:45.000Z | 15 secondi | 15 secondi fa | 0 ore | +| 1999-12-31T23:59:35.000Z | 25 secondi | 25 secondi fa | 0 ore | +| 1999-12-31T23:59:00.000Z | un minuto | un minuto fa | 0 ore | +| 1999-12-31T23:45:00.000Z | 15 minuti | 15 minuti fa | 0 ore | +| 1999-12-31T23:30:00.000Z | 30 minuti | 30 minuti fa | un'ora | +| 1999-12-31T23:15:00.000Z | 45 minuti | 45 minuti fa | un'ora | +| 1999-12-31T23:00:00.000Z | un'ora | un'ora fa | un'ora | +| 1999-12-31T18:00:00.000Z | 6 ore | 6 ore fa | 6 ore | +| 1999-12-30T00:00:00.000Z | 2 giorni | 2 giorni fa | 48 ore | +| 1999-12-15T00:00:00.000Z | 17 giorni | 17 giorni fa | 408 ore | +| 1999-12-01T00:00:00.000Z | un mese | un mese fa | 744 ore | +| 1999-11-01T00:00:00.000Z | 2 mesi | 2 mesi fa | 1464 ore | +| 1999-06-01T00:00:00.000Z | 7 mesi | 7 mesi fa | 5136 ore | +| 1999-01-01T00:00:00.000Z | un anno | un anno fa | 8760 ore | +| 1998-12-01T00:00:00.000Z | un anno | un anno fa | 9504 ore | +| 1998-06-01T00:00:00.000Z | 2 anni | 2 anni fa | 13896 ore | +| 1998-01-01T00:00:00.000Z | 2 anni | 2 anni fa | 17520 ore | +| 1997-01-01T00:00:00.000Z | 3 anni | 3 anni fa | 26280 ore | +| 1996-01-01T00:00:00.000Z | 4 anni | 4 anni fa | 35064 ore | +| 1995-01-01T00:00:00.000Z | 5 anni | 5 anni fa | 43824 ore | +| 1994-01-01T00:00:00.000Z | 6 anni | 6 anni fa | 52584 ore | + +## `formatRelative` + +If now is January 1st, 2000, 00:00. + +| Date | Result | +| ------------------------ | ----------------------------- | +| 2000-01-10T00:00:00.000Z | 10/01/2000 | +| 2000-01-05T00:00:00.000Z | mercoledì prossimo alle 00:00 | +| 2000-01-02T00:00:00.000Z | domani alle 00:00 | +| 2000-01-01T00:00:00.000Z | oggi alle 00:00 | +| 1999-12-31T00:00:00.000Z | ieri alle 00:00 | +| 1999-12-27T00:00:00.000Z | lunedì alle 00:00 | +| 1999-12-21T00:00:00.000Z | 21/12/1999 | |