diff options
author | Sebastian <sebasjm@gmail.com> | 2021-08-23 16:46:06 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-08-23 16:48:30 -0300 |
commit | 38acabfa6089ab8ac469c12b5f55022fb96935e5 (patch) | |
tree | 453dbf70000cc5e338b06201af1eaca8343f8f73 /date-fns/src/locale/vi | |
parent | f26125e039143b92dc0d84e7775f508ab0cdcaa8 (diff) | |
download | node-vendor-master.tar.gz node-vendor-master.tar.bz2 node-vendor-master.zip |
Diffstat (limited to 'date-fns/src/locale/vi')
-rw-r--r-- | date-fns/src/locale/vi/_lib/formatDistance/index.js | 101 | ||||
-rw-r--r-- | date-fns/src/locale/vi/_lib/formatLong/index.js | 47 | ||||
-rw-r--r-- | date-fns/src/locale/vi/_lib/formatRelative/index.js | 12 | ||||
-rw-r--r-- | date-fns/src/locale/vi/_lib/localize/index.js | 295 | ||||
-rw-r--r-- | date-fns/src/locale/vi/_lib/match/index.js | 158 | ||||
-rw-r--r-- | date-fns/src/locale/vi/index.d.ts | 4 | ||||
-rw-r--r-- | date-fns/src/locale/vi/index.js | 29 | ||||
-rw-r--r-- | date-fns/src/locale/vi/index.js.flow | 35 | ||||
-rw-r--r-- | date-fns/src/locale/vi/snapshot.md | 304 |
9 files changed, 985 insertions, 0 deletions
diff --git a/date-fns/src/locale/vi/_lib/formatDistance/index.js b/date-fns/src/locale/vi/_lib/formatDistance/index.js new file mode 100644 index 0000000..35677f0 --- /dev/null +++ b/date-fns/src/locale/vi/_lib/formatDistance/index.js @@ -0,0 +1,101 @@ +var formatDistanceLocale = { + lessThanXSeconds: { + one: 'dưới 1 giây', + other: 'dưới {{count}} giây' + }, + + xSeconds: { + one: '1 giây', + other: '{{count}} giây' + }, + + halfAMinute: 'nửa phút', + + lessThanXMinutes: { + one: 'dưới 1 phút', + other: 'dưới {{count}} phút' + }, + + xMinutes: { + one: '1 phút', + other: '{{count}} phút' + }, + + aboutXHours: { + one: 'khoảng 1 giờ', + other: 'khoảng {{count}} giờ' + }, + + xHours: { + one: '1 giờ', + other: '{{count}} giờ' + }, + + xDays: { + one: '1 ngày', + other: '{{count}} ngày' + }, + + aboutXWeeks: { + one: 'khoảng 1 tuần', + other: 'khoảng {{count}} tuần' + }, + + xWeeks: { + one: '1 tuần', + other: '{{count}} tuần' + }, + + aboutXMonths: { + one: 'khoảng 1 tháng', + other: 'khoảng {{count}} tháng' + }, + + xMonths: { + one: '1 tháng', + other: '{{count}} tháng' + }, + + aboutXYears: { + one: 'khoảng 1 năm', + other: 'khoảng {{count}} năm' + }, + + xYears: { + one: '1 năm', + other: '{{count}} năm' + }, + + overXYears: { + one: 'hơn 1 năm', + other: 'hơn {{count}} năm' + }, + + almostXYears: { + one: 'gần 1 năm', + other: 'gần {{count}} năm' + } +} + +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 result + ' nữa' + } else { + return result + ' trước' + } + } + + return result +} diff --git a/date-fns/src/locale/vi/_lib/formatLong/index.js b/date-fns/src/locale/vi/_lib/formatLong/index.js new file mode 100644 index 0000000..4762cc6 --- /dev/null +++ b/date-fns/src/locale/vi/_lib/formatLong/index.js @@ -0,0 +1,47 @@ +import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index' + +var dateFormats = { + // thứ Sáu, ngày 25 tháng 08 năm 2017 + full: "EEEE, 'ngày' d MMMM 'năm' y", + // ngày 25 tháng 08 năm 2017 + long: "'ngày' d MMMM 'năm' y", + // 25 thg 08 năm 2017 + medium: "d MMM 'năm' y", + // 25/08/2017 + 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 = { + // thứ Sáu, ngày 25 tháng 08 năm 2017 23:25:59 + full: '{{date}} {{time}}', + // ngày 25 tháng 08 năm 2017 23:25 + 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/vi/_lib/formatRelative/index.js b/date-fns/src/locale/vi/_lib/formatRelative/index.js new file mode 100644 index 0000000..4270321 --- /dev/null +++ b/date-fns/src/locale/vi/_lib/formatRelative/index.js @@ -0,0 +1,12 @@ +var formatRelativeLocale = { + lastWeek: "eeee 'tuần trước vào lúc' p", + yesterday: "'hôm qua vào lúc' p", + today: "'hôm nay vào lúc' p", + tomorrow: "'ngày mai vào lúc' p", + nextWeek: "eeee 'tới vào lúc' p", + other: 'P' +} + +export default function formatRelative(token, _date, _baseDate, _options) { + return formatRelativeLocale[token] +} diff --git a/date-fns/src/locale/vi/_lib/localize/index.js b/date-fns/src/locale/vi/_lib/localize/index.js new file mode 100644 index 0000000..07dbe80 --- /dev/null +++ b/date-fns/src/locale/vi/_lib/localize/index.js @@ -0,0 +1,295 @@ +import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index' + +// Vietnamese locale reference: http://www.localeplanet.com/icu/vi-VN/index.html +// Capitalization reference: http://hcmup.edu.vn/index.php?option=com_content&view=article&id=4106%3Avit-hoa-trong-vn-bn-hanh-chinh&catid=2345%3Atham-kho&Itemid=4103&lang=vi&site=134 + +var eraValues = { + narrow: ['TCN', 'SCN'], + abbreviated: ['trước CN', 'sau CN'], + wide: ['trước Công Nguyên', 'sau Công Nguyên'] +} + +var quarterValues = { + narrow: ['1', '2', '3', '4'], + abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'], + wide: ['Quý 1', 'Quý 2', 'Quý 3', 'Quý 4'] +} + +var formattingQuarterValues = { + narrow: ['1', '2', '3', '4'], + abbreviated: ['Q1', 'Q2', 'Q3', 'Q4'], + // I notice many news outlet use this "quý II/2018" + wide: ['quý I', 'quý II', 'quý III', 'quý IV'] +} + +// Note: in English, the names of days of the week and months are capitalized. +// If you are making a new locale based on this one, check if the same is true for the language you're working on. +// Generally, formatted dates should look like they are in the middle of a sentence, +// e.g. in Spanish language the weekdays and months should be in the lowercase. +var monthValues = { + narrow: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'], + abbreviated: [ + 'Thg 1', + 'Thg 2', + 'Thg 3', + 'Thg 4', + 'Thg 5', + 'Thg 6', + 'Thg 7', + 'Thg 8', + 'Thg 9', + 'Thg 10', + 'Thg 11', + 'Thg 12' + ], + wide: [ + 'Tháng Một', + 'Tháng Hai', + 'Tháng Ba', + 'Tháng Tư', + 'Tháng Năm', + 'Tháng Sáu', + 'Tháng Bảy', + 'Tháng Tám', + 'Tháng Chín', + 'Tháng Mười', + 'Tháng Mười Một', + 'Tháng Mười Hai' + ] +} +// In Vietnamese date formatting, month number less than 10 expected to have leading zero +var formattingMonthValues = { + narrow: [ + '01', + '02', + '03', + '04', + '05', + '06', + '07', + '08', + '09', + '10', + '11', + '12' + ], + abbreviated: [ + 'thg 1', + 'thg 2', + 'thg 3', + 'thg 4', + 'thg 5', + 'thg 6', + 'thg 7', + 'thg 8', + 'thg 9', + 'thg 10', + 'thg 11', + 'thg 12' + ], + wide: [ + 'tháng 01', + 'tháng 02', + 'tháng 03', + 'tháng 04', + 'tháng 05', + 'tháng 06', + 'tháng 07', + 'tháng 08', + 'tháng 09', + 'tháng 10', + 'tháng 11', + 'tháng 12' + ] +} + +var dayValues = { + narrow: ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'], + short: ['CN', 'Th 2', 'Th 3', 'Th 4', 'Th 5', 'Th 6', 'Th 7'], + abbreviated: ['CN', 'Thứ 2', 'Thứ 3', 'Thứ 4', 'Thứ 5', 'Thứ 6', 'Thứ 7'], + wide: [ + 'Chủ Nhật', + 'Thứ Hai', + 'Thứ Ba', + 'Thứ Tư', + 'Thứ Năm', + 'Thứ Sáu', + 'Thứ Bảy' + ] +} + +// Vietnamese are used to AM/PM borrowing from English, hence `narrow` and +// `abbreviated` are just like English but I'm leaving the `wide` +// format being localized with abbreviations found in some systems (SÁng / CHiều); +// however, personally, I don't think `Chiều` sounds appropriate for `PM` +var dayPeriodValues = { + // narrow date period is extremely rare in Vietnamese + // I used abbreviated form for noon, morning and afternoon + // which are regconizable by Vietnamese, others cannot be any shorter + narrow: { + am: 'am', + pm: 'pm', + midnight: 'nửa đêm', + noon: 'tr', + morning: 'sg', + afternoon: 'ch', + evening: 'tối', + night: 'đêm' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'nửa đêm', + noon: 'trưa', + morning: 'sáng', + afternoon: 'chiều', + evening: 'tối', + night: 'đêm' + }, + wide: { + am: 'SA', + pm: 'CH', + midnight: 'nửa đêm', + noon: 'trưa', + morning: 'sáng', + afternoon: 'chiều', + evening: 'tối', + night: 'đêm' + } +} + +var formattingDayPeriodValues = { + narrow: { + am: 'am', + pm: 'pm', + midnight: 'nửa đêm', + noon: 'tr', + morning: 'sg', + afternoon: 'ch', + evening: 'tối', + night: 'đêm' + }, + abbreviated: { + am: 'AM', + pm: 'PM', + midnight: 'nửa đêm', + noon: 'trưa', + morning: 'sáng', + afternoon: 'chiều', + evening: 'tối', + night: 'đêm' + }, + wide: { + am: 'SA', + pm: 'CH', + midnight: 'nửa đêm', + noon: 'giữa trưa', + morning: 'vào buổi sáng', + afternoon: 'vào buổi chiều', + evening: 'vào buổi tối', + night: 'vào ban đêm' + } +} + +// If ordinal numbers depend on context, for example, +// if they are different for different grammatical genders, +// use `options.unit`: +// +// var options = dirtyOptions || {} +// var unit = String(options.unit) +// +// where `unit` can be 'month', 'quarter', 'week', 'isoWeek', 'dayOfYear', +// 'dayOfMonth' or 'dayOfWeek' +function ordinalNumber(dirtyNumber, dirtyOptions) { + var options = dirtyOptions || {} + var unit = String(options.unit) + var number = parseInt(dirtyNumber, 10) + + if (unit === 'quarter') { + // many news outlets use "quý I"... + switch (number) { + case 1: + return 'I' + case 2: + return 'II' + case 3: + return 'III' + case 4: + return 'IV' + } + } else if (unit === 'day') { + // day of week in Vietnamese has ordinal number meaning, + // so we should use them, else it'll sound weird + switch (number) { + case 1: + return 'thứ 2' // meaning 2nd day but it's the first day of the week :D + case 2: + return 'thứ 3' // meaning 3rd day + case 3: + return 'thứ 4' // meaning 4th day and so on + case 4: + return 'thứ 5' + case 5: + return 'thứ 6' + case 6: + return 'thứ 7' + case 7: + return 'chủ nhật' // meaning Sunday, there's no 8th day :D + } + } else if (unit === 'week') { + if (number === 1) { + return 'thứ nhất' + } else { + return 'thứ ' + number + } + } else if (unit === 'dayOfYear') { + if (number === 1) { + return 'đầu tiên' + } else { + return 'thứ ' + number + } + } + + // there are no different forms of ordinal numbers in Vietnamese + return number +} + +var localize = { + ordinalNumber: ordinalNumber, + + era: buildLocalizeFn({ + values: eraValues, + defaultWidth: 'wide' + }), + + quarter: buildLocalizeFn({ + values: quarterValues, + defaultWidth: 'wide', + formattingValues: formattingQuarterValues, + defaultFormattingWidth: 'wide', + argumentCallback: function(quarter) { + return Number(quarter) - 1 + } + }), + + month: buildLocalizeFn({ + values: monthValues, + defaultWidth: 'wide', + formattingValues: formattingMonthValues, + defaultFormattingWidth: '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/vi/_lib/match/index.js b/date-fns/src/locale/vi/_lib/match/index.js new file mode 100644 index 0000000..177c278 --- /dev/null +++ b/date-fns/src/locale/vi/_lib/match/index.js @@ -0,0 +1,158 @@ +import buildMatchPatternFn from '../../../_lib/buildMatchPatternFn/index' +import buildMatchFn from '../../../_lib/buildMatchFn/index' + +var matchOrdinalNumberPattern = /^(\d+)/i +var parseOrdinalNumberPattern = /\d+/i + +var matchEraPatterns = { + narrow: /^(tcn|scn)/i, + abbreviated: /^(trước CN|sau CN)/i, + wide: /^(trước Công Nguyên|sau Công Nguyên)/i +} +var parseEraPatterns = { + any: [/^t/i, /^s/i] +} + +var matchQuarterPatterns = { + narrow: /^([1234]|i{1,3}v?)/i, + abbreviated: /^q([1234]|i{1,3}v?)/i, + wide: /^quý ([1234]|i{1,3}v?)/i +} +var parseQuarterPatterns = { + any: [/(1|i)$/i, /(2|ii)$/i, /(3|iii)$/i, /(4|iv)$/i] +} + +var matchMonthPatterns = { + // month number may contain leading 0, 'thg' prefix may have space, underscore or empty before number + // note the order of '1' since it is a sub-string of '10', so must be lower priority + narrow: /^(0?[2-9]|10|11|12|0?1)/i, + // note the order of 'thg 1' since it is sub-string of 'thg 10', so must be lower priority + abbreviated: /^thg[ _]?(0?[1-9](?!\d)|10|11|12)/i, + // note the order of 'Mười' since it is sub-string of Mười Một, so must be lower priority + wide: /^tháng ?(Một|Hai|Ba|Tư|Năm|Sáu|Bảy|Tám|Chín|Mười|Mười ?Một|Mười ?Hai|0?[1-9](?!\d)|10|11|12)/i +} +var parseMonthPatterns = { + narrow: [ + /0?1$/i, + /0?2/i, + /3/, + /4/, + /5/, + /6/, + /7/, + /8/, + /9/, + /10/, + /11/, + /12/ + ], + abbreviated: [ + /^thg[ _]?0?1(?!\d)/i, + /^thg[ _]?0?2/i, + /^thg[ _]?0?3/i, + /^thg[ _]?0?4/i, + /^thg[ _]?0?5/i, + /^thg[ _]?0?6/i, + /^thg[ _]?0?7/i, + /^thg[ _]?0?8/i, + /^thg[ _]?0?9/i, + /^thg[ _]?10/i, + /^thg[ _]?11/i, + /^thg[ _]?12/i + ], + wide: [ + /^tháng ?(Một|0?1(?!\d))/i, + /^tháng ?(Hai|0?2)/i, + /^tháng ?(Ba|0?3)/i, + /^tháng ?(Tư|0?4)/i, + /^tháng ?(Năm|0?5)/i, + /^tháng ?(Sáu|0?6)/i, + /^tháng ?(Bảy|0?7)/i, + /^tháng ?(Tám|0?8)/i, + /^tháng ?(Chín|0?9)/i, + /^tháng ?(Mười|10)/i, + /^tháng ?(Mười ?Một|11)/i, + /^tháng ?(Mười ?Hai|12)/i + ] +} + +var matchDayPatterns = { + narrow: /^(CN|T2|T3|T4|T5|T6|T7)/i, + short: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i, + abbreviated: /^(CN|Th ?2|Th ?3|Th ?4|Th ?5|Th ?6|Th ?7)/i, + wide: /^(Chủ ?Nhật|Chúa ?Nhật|thứ ?Hai|thứ ?Ba|thứ ?Tư|thứ ?Năm|thứ ?Sáu|thứ ?Bảy)/i +} +var parseDayPatterns = { + narrow: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i], + short: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i], + abbreviated: [/CN/i, /2/i, /3/i, /4/i, /5/i, /6/i, /7/i], + wide: [/(Chủ|Chúa) ?Nhật/i, /Hai/i, /Ba/i, /Tư/i, /Năm/i, /Sáu/i, /Bảy/i] +} + +var matchDayPeriodPatterns = { + narrow: /^(a|p|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i, + abbreviated: /^(am|pm|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i, + wide: /^(ch[^i]*|sa|nửa đêm|trưa|(giờ) (sáng|chiều|tối|đêm))/i +} +var parseDayPeriodPatterns = { + any: { + am: /^(a|sa)/i, + pm: /^(p|ch[^i]*)/i, + midnight: /nửa đêm/i, + noon: /trưa/i, + morning: /sáng/i, + afternoon: /chiều/i, + evening: /tối/i, + night: /^đêm/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/vi/index.d.ts b/date-fns/src/locale/vi/index.d.ts new file mode 100644 index 0000000..17be5ca --- /dev/null +++ b/date-fns/src/locale/vi/index.d.ts @@ -0,0 +1,4 @@ +// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it. + +import { vi } from 'date-fns/locale' +export default vi diff --git a/date-fns/src/locale/vi/index.js b/date-fns/src/locale/vi/index.js new file mode 100644 index 0000000..a3487e7 --- /dev/null +++ b/date-fns/src/locale/vi/index.js @@ -0,0 +1,29 @@ +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 Vietnamese locale (Vietnam). + * @language Vietnamese + * @iso-639-2 vie + * @author Thanh Tran [@trongthanh]{@link https://github.com/trongthanh} + * @author Leroy Hopson [@lihop]{@link https://github.com/lihop} + */ +var locale = { + code: 'vi', + formatDistance: formatDistance, + formatLong: formatLong, + formatRelative: formatRelative, + localize: localize, + match: match, + options: { + weekStartsOn: 1 /* Monday */, + firstWeekContainsDate: 1 /* First week of new year contains Jan 1st */ + } +} + +export default locale diff --git a/date-fns/src/locale/vi/index.js.flow b/date-fns/src/locale/vi/index.js.flow new file mode 100644 index 0000000..b9dfe66 --- /dev/null +++ b/date-fns/src/locale/vi/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/vi/snapshot.md b/date-fns/src/locale/vi/snapshot.md new file mode 100644 index 0000000..3609a7a --- /dev/null +++ b/date-fns/src/locale/vi/snapshot.md @@ -0,0 +1,304 @@ +# Vietnamese (vi) 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 | 5 | 0004-12-27T00:00:00.000Z | +| Quarter (formatting) | Qo | 2019-01-01T12:13:14.015Z | I | Invalid Date | +| | | 2019-04-01T12:13:14.015Z | II | Invalid Date | +| | QQQ | 2019-01-01T12:13:14.015Z | Q1 | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | Q2 | 2019-04-01T00:00:00.000Z | +| | QQQQ | 2019-01-01T12:13:14.015Z | quý I | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | quý II | 2019-01-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 | I | Invalid Date | +| | | 2019-04-01T12:13:14.015Z | II | Invalid Date | +| | qqq | 2019-01-01T12:13:14.015Z | Q1 | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | Q2 | 2019-04-01T00:00:00.000Z | +| | qqqq | 2019-01-01T12:13:14.015Z | Quý 1 | 2019-01-01T00:00:00.000Z | +| | | 2019-04-01T12:13:14.015Z | Quý 2 | 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 | thg 2 | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | thg 7 | 2019-07-01T00:00:00.000Z | +| | MMMM | 2019-02-11T12:13:14.015Z | tháng 02 | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | tháng 07 | 2019-07-01T00:00:00.000Z | +| | MMMMM | 2019-02-11T12:13:14.015Z | 02 | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | 07 | 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 | Thg 2 | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | Thg 7 | 2019-07-01T00:00:00.000Z | +| | LLLL | 2019-02-11T12:13:14.015Z | Tháng Hai | 2019-02-01T00:00:00.000Z | +| | | 2019-07-10T12:13:14.015Z | Tháng Bảy | 2019-07-01T00:00:00.000Z | +| | LLLLL | 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 | +| Local week of year | wo | 2019-01-01T12:13:14.015Z | thứ nhất | Invalid Date | +| | | 2019-12-01T12:13:14.015Z | thứ 48 | Invalid Date | +| ISO week of year | Io | 2019-01-01T12:13:14.015Z | thứ nhất | Invalid Date | +| | | 2019-12-01T12:13:14.015Z | thứ 48 | Invalid Date | +| 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 | thứ 42 | Invalid Date | +| | | 2019-12-31T12:13:14.015Z | thứ 365 | Invalid Date | +| Day of week (formatting) | E | 2019-02-11T12:13:14.015Z | Thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | Thứ 6 | Invalid Date | +| | EE | 2019-02-11T12:13:14.015Z | Thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | Thứ 6 | Invalid Date | +| | EEE | 2019-02-11T12:13:14.015Z | Thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | Thứ 6 | Invalid Date | +| | EEEE | 2019-02-11T12:13:14.015Z | Thứ Hai | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Thứ Sáu | 2019-02-15T00:00:00.000Z | +| | EEEEE | 2019-02-11T12:13:14.015Z | T2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | T6 | 2019-02-15T00:00:00.000Z | +| | EEEEEE | 2019-02-11T12:13:14.015Z | Th 2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Th 6 | 2019-02-15T00:00:00.000Z | +| ISO day of week (formatting) | io | 2019-02-11T12:13:14.015Z | thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | thứ 6 | Invalid Date | +| | iii | 2019-02-11T12:13:14.015Z | Thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | Thứ 6 | Invalid Date | +| | iiii | 2019-02-11T12:13:14.015Z | Thứ Hai | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Thứ Sáu | 2019-02-15T00:00:00.000Z | +| | iiiii | 2019-02-11T12:13:14.015Z | T2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | T6 | 2019-02-15T00:00:00.000Z | +| | iiiiii | 2019-02-11T12:13:14.015Z | Th 2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Th 6 | 2019-02-15T00:00:00.000Z | +| Local day of week (formatting) | eo | 2019-02-11T12:13:14.015Z | thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | thứ 6 | Invalid Date | +| | eee | 2019-02-11T12:13:14.015Z | Thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | Thứ 6 | Invalid Date | +| | eeee | 2019-02-11T12:13:14.015Z | Thứ Hai | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Thứ Sáu | 2019-02-15T00:00:00.000Z | +| | eeeee | 2019-02-11T12:13:14.015Z | T2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | T6 | 2019-02-15T00:00:00.000Z | +| | eeeeee | 2019-02-11T12:13:14.015Z | Th 2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Th 6 | 2019-02-15T00:00:00.000Z | +| Local day of week (stand-alone) | co | 2019-02-11T12:13:14.015Z | thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | thứ 6 | Invalid Date | +| | ccc | 2019-02-11T12:13:14.015Z | Thứ 2 | Invalid Date | +| | | 2019-02-15T12:13:14.015Z | Thứ 6 | Invalid Date | +| | cccc | 2019-02-11T12:13:14.015Z | Thứ Hai | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Thứ Sáu | 2019-02-15T00:00:00.000Z | +| | ccccc | 2019-02-11T12:13:14.015Z | T2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | T6 | 2019-02-15T00:00:00.000Z | +| | cccccc | 2019-02-11T12:13:14.015Z | Th 2 | 2019-02-11T00:00:00.000Z | +| | | 2019-02-15T12:13:14.015Z | Th 6 | 2019-02-15T00:00:00.000Z | +| 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 | SA | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | CH | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | CH | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | SA | 2019-02-11T00:00:00.000Z | +| | aaaaa | 2019-02-11T11:13:14.015Z | am | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | pm | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | pm | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | am | Invalid Date | +| 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 | SA | 2019-02-11T00:00:00.000Z | +| | | 2019-02-11T14:13:14.015Z | CH | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T19:13:14.015Z | CH | 2019-02-11T12:00:00.000Z | +| | | 2019-02-11T02:13:14.015Z | SA | 2019-02-11T00:00:00.000Z | +| | bbbbb | 2019-02-11T11:13:14.015Z | am | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | pm | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | pm | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | am | Invalid Date | +| Flexible day period | B | 2019-02-11T11:13:14.015Z | sáng | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | chiều | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | tối | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | đêm | Invalid Date | +| | BB | 2019-02-11T11:13:14.015Z | sáng | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | chiều | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | tối | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | đêm | Invalid Date | +| | BBB | 2019-02-11T11:13:14.015Z | sáng | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | chiều | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | tối | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | đêm | Invalid Date | +| | BBBB | 2019-02-11T11:13:14.015Z | vào buổi sáng | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | vào buổi chiều | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | vào buổi tối | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | vào ban đêm | Invalid Date | +| | BBBBB | 2019-02-11T11:13:14.015Z | sg | Invalid Date | +| | | 2019-02-11T14:13:14.015Z | ch | Invalid Date | +| | | 2019-02-11T19:13:14.015Z | tối | Invalid Date | +| | | 2019-02-11T02:13:14.015Z | đêm | Invalid Date | +| 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 thg 2 năm 1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | 29 thg 5 năm 1453 | 1453-05-29T00:00:00.000Z | +| | PPP | 1987-02-11T12:13:14.015Z | ngày 11 tháng 02 năm 1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | ngày 29 tháng 05 năm 1453 | 1453-05-29T00:00:00.000Z | +| | PPPP | 1987-02-11T12:13:14.015Z | Thứ Tư, ngày 11 tháng 02 năm 1987 | 1987-02-11T00:00:00.000Z | +| | | 1453-05-29T23:59:59.999Z | Chủ Nhật, ngày 29 tháng 05 năm 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 thg 2 năm 1987 12:13:14 | 1987-02-11T12:13:14.000Z | +| | | 1453-05-29T23:59:59.999Z | 29 thg 5 năm 1453 23:59:59 | 1453-05-29T23:59:59.000Z | +| | PPPppp | 1987-02-11T12:13:14.015Z | ngày 11 tháng 02 năm 1987 12:13:14 GMT+0 | Errored | +| | | 1453-05-29T23:59:59.999Z | ngày 29 tháng 05 năm 1453 23:59:59 GMT+0 | Errored | +| | PPPPpppp | 1987-02-11T12:13:14.015Z | Thứ Tư, ngày 11 tháng 02 năm 1987 12:13:14 GMT+00:00 | Errored | +| | | 1453-05-29T23:59:59.999Z | Chủ Nhật, ngày 29 tháng 05 năm 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 | khoảng 6 năm | khoảng 6 năm | khoảng 6 năm nữa | +| 2005-01-01T00:00:00.000Z | khoảng 5 năm | khoảng 5 năm | khoảng 5 năm nữa | +| 2004-01-01T00:00:00.000Z | khoảng 4 năm | khoảng 4 năm | khoảng 4 năm nữa | +| 2003-01-01T00:00:00.000Z | khoảng 3 năm | khoảng 3 năm | khoảng 3 năm nữa | +| 2002-01-01T00:00:00.000Z | khoảng 2 năm | khoảng 2 năm | khoảng 2 năm nữa | +| 2001-06-01T00:00:00.000Z | hơn 1 năm | hơn 1 năm | hơn 1 năm nữa | +| 2001-02-01T00:00:00.000Z | khoảng 1 năm | khoảng 1 năm | khoảng 1 năm nữa | +| 2001-01-01T00:00:00.000Z | khoảng 1 năm | khoảng 1 năm | khoảng 1 năm nữa | +| 2000-06-01T00:00:00.000Z | 5 tháng | 5 tháng | 5 tháng nữa | +| 2000-03-01T00:00:00.000Z | 2 tháng | 2 tháng | 2 tháng nữa | +| 2000-02-01T00:00:00.000Z | khoảng 1 tháng | khoảng 1 tháng | khoảng 1 tháng nữa | +| 2000-01-15T00:00:00.000Z | 14 ngày | 14 ngày | 14 ngày nữa | +| 2000-01-02T00:00:00.000Z | 1 ngày | 1 ngày | 1 ngày nữa | +| 2000-01-01T06:00:00.000Z | khoảng 6 giờ | khoảng 6 giờ | khoảng 6 giờ nữa | +| 2000-01-01T01:00:00.000Z | khoảng 1 giờ | khoảng 1 giờ | khoảng 1 giờ nữa | +| 2000-01-01T00:45:00.000Z | khoảng 1 giờ | khoảng 1 giờ | khoảng 1 giờ nữa | +| 2000-01-01T00:30:00.000Z | 30 phút | 30 phút | 30 phút nữa | +| 2000-01-01T00:15:00.000Z | 15 phút | 15 phút | 15 phút nữa | +| 2000-01-01T00:01:00.000Z | 1 phút | 1 phút | 1 phút nữa | +| 2000-01-01T00:00:25.000Z | dưới 1 phút | nửa phút | dưới 1 phút nữa | +| 2000-01-01T00:00:15.000Z | dưới 1 phút | dưới 20 giây | dưới 1 phút nữa | +| 2000-01-01T00:00:05.000Z | dưới 1 phút | dưới 10 giây | dưới 1 phút nữa | +| 2000-01-01T00:00:00.000Z | dưới 1 phút | dưới 5 giây | dưới 1 phút trước | +| 1999-12-31T23:59:55.000Z | dưới 1 phút | dưới 10 giây | dưới 1 phút trước | +| 1999-12-31T23:59:45.000Z | dưới 1 phút | dưới 20 giây | dưới 1 phút trước | +| 1999-12-31T23:59:35.000Z | dưới 1 phút | nửa phút | dưới 1 phút trước | +| 1999-12-31T23:59:00.000Z | 1 phút | 1 phút | 1 phút trước | +| 1999-12-31T23:45:00.000Z | 15 phút | 15 phút | 15 phút trước | +| 1999-12-31T23:30:00.000Z | 30 phút | 30 phút | 30 phút trước | +| 1999-12-31T23:15:00.000Z | khoảng 1 giờ | khoảng 1 giờ | khoảng 1 giờ trước | +| 1999-12-31T23:00:00.000Z | khoảng 1 giờ | khoảng 1 giờ | khoảng 1 giờ trước | +| 1999-12-31T18:00:00.000Z | khoảng 6 giờ | khoảng 6 giờ | khoảng 6 giờ trước | +| 1999-12-30T00:00:00.000Z | 2 ngày | 2 ngày | 2 ngày trước | +| 1999-12-15T00:00:00.000Z | 17 ngày | 17 ngày | 17 ngày trước | +| 1999-12-01T00:00:00.000Z | khoảng 1 tháng | khoảng 1 tháng | khoảng 1 tháng trước | +| 1999-11-01T00:00:00.000Z | 2 tháng | 2 tháng | 2 tháng trước | +| 1999-06-01T00:00:00.000Z | 7 tháng | 7 tháng | 7 tháng trước | +| 1999-01-01T00:00:00.000Z | khoảng 1 năm | khoảng 1 năm | khoảng 1 năm trước | +| 1998-12-01T00:00:00.000Z | khoảng 1 năm | khoảng 1 năm | khoảng 1 năm trước | +| 1998-06-01T00:00:00.000Z | hơn 1 năm | hơn 1 năm | hơn 1 năm trước | +| 1998-01-01T00:00:00.000Z | khoảng 2 năm | khoảng 2 năm | khoảng 2 năm trước | +| 1997-01-01T00:00:00.000Z | khoảng 3 năm | khoảng 3 năm | khoảng 3 năm trước | +| 1996-01-01T00:00:00.000Z | khoảng 4 năm | khoảng 4 năm | khoảng 4 năm trước | +| 1995-01-01T00:00:00.000Z | khoảng 5 năm | khoảng 5 năm | khoảng 5 năm trước | +| 1994-01-01T00:00:00.000Z | khoảng 6 năm | khoảng 6 năm | khoảng 6 năm trước | + +## `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 năm | 6 năm nữa | 52608 giờ | +| 2005-01-01T00:00:00.000Z | 5 năm | 5 năm nữa | 43848 giờ | +| 2004-01-01T00:00:00.000Z | 4 năm | 4 năm nữa | 35064 giờ | +| 2003-01-01T00:00:00.000Z | 3 năm | 3 năm nữa | 26304 giờ | +| 2002-01-01T00:00:00.000Z | 2 năm | 2 năm nữa | 17544 giờ | +| 2001-06-01T00:00:00.000Z | 1 năm | 1 năm nữa | 12408 giờ | +| 2001-02-01T00:00:00.000Z | 1 năm | 1 năm nữa | 9528 giờ | +| 2001-01-01T00:00:00.000Z | 1 năm | 1 năm nữa | 8784 giờ | +| 2000-06-01T00:00:00.000Z | 5 tháng | 5 tháng nữa | 3648 giờ | +| 2000-03-01T00:00:00.000Z | 2 tháng | 2 tháng nữa | 1440 giờ | +| 2000-02-01T00:00:00.000Z | 1 tháng | 1 tháng nữa | 744 giờ | +| 2000-01-15T00:00:00.000Z | 14 ngày | 14 ngày nữa | 336 giờ | +| 2000-01-02T00:00:00.000Z | 1 ngày | 1 ngày nữa | 24 giờ | +| 2000-01-01T06:00:00.000Z | 6 giờ | 6 giờ nữa | 6 giờ | +| 2000-01-01T01:00:00.000Z | 1 giờ | 1 giờ nữa | 1 giờ | +| 2000-01-01T00:45:00.000Z | 45 phút | 45 phút nữa | 1 giờ | +| 2000-01-01T00:30:00.000Z | 30 phút | 30 phút nữa | 1 giờ | +| 2000-01-01T00:15:00.000Z | 15 phút | 15 phút nữa | 0 giờ | +| 2000-01-01T00:01:00.000Z | 1 phút | 1 phút nữa | 0 giờ | +| 2000-01-01T00:00:25.000Z | 25 giây | 25 giây nữa | 0 giờ | +| 2000-01-01T00:00:15.000Z | 15 giây | 15 giây nữa | 0 giờ | +| 2000-01-01T00:00:05.000Z | 5 giây | 5 giây nữa | 0 giờ | +| 2000-01-01T00:00:00.000Z | 0 giây | 0 giây trước | 0 giờ | +| 1999-12-31T23:59:55.000Z | 5 giây | 5 giây trước | 0 giờ | +| 1999-12-31T23:59:45.000Z | 15 giây | 15 giây trước | 0 giờ | +| 1999-12-31T23:59:35.000Z | 25 giây | 25 giây trước | 0 giờ | +| 1999-12-31T23:59:00.000Z | 1 phút | 1 phút trước | 0 giờ | +| 1999-12-31T23:45:00.000Z | 15 phút | 15 phút trước | 0 giờ | +| 1999-12-31T23:30:00.000Z | 30 phút | 30 phút trước | 1 giờ | +| 1999-12-31T23:15:00.000Z | 45 phút | 45 phút trước | 1 giờ | +| 1999-12-31T23:00:00.000Z | 1 giờ | 1 giờ trước | 1 giờ | +| 1999-12-31T18:00:00.000Z | 6 giờ | 6 giờ trước | 6 giờ | +| 1999-12-30T00:00:00.000Z | 2 ngày | 2 ngày trước | 48 giờ | +| 1999-12-15T00:00:00.000Z | 17 ngày | 17 ngày trước | 408 giờ | +| 1999-12-01T00:00:00.000Z | 1 tháng | 1 tháng trước | 744 giờ | +| 1999-11-01T00:00:00.000Z | 2 tháng | 2 tháng trước | 1464 giờ | +| 1999-06-01T00:00:00.000Z | 7 tháng | 7 tháng trước | 5136 giờ | +| 1999-01-01T00:00:00.000Z | 1 năm | 1 năm trước | 8760 giờ | +| 1998-12-01T00:00:00.000Z | 1 năm | 1 năm trước | 9504 giờ | +| 1998-06-01T00:00:00.000Z | 2 năm | 2 năm trước | 13896 giờ | +| 1998-01-01T00:00:00.000Z | 2 năm | 2 năm trước | 17520 giờ | +| 1997-01-01T00:00:00.000Z | 3 năm | 3 năm trước | 26280 giờ | +| 1996-01-01T00:00:00.000Z | 4 năm | 4 năm trước | 35064 giờ | +| 1995-01-01T00:00:00.000Z | 5 năm | 5 năm trước | 43824 giờ | +| 1994-01-01T00:00:00.000Z | 6 năm | 6 năm trước | 52584 giờ | + +## `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 | Thứ Tư tới vào lúc 00:00 | +| 2000-01-02T00:00:00.000Z | ngày mai vào lúc 00:00 | +| 2000-01-01T00:00:00.000Z | hôm nay vào lúc 00:00 | +| 1999-12-31T00:00:00.000Z | hôm qua vào lúc 00:00 | +| 1999-12-27T00:00:00.000Z | Thứ Hai tuần trước vào lúc 00:00 | +| 1999-12-21T00:00:00.000Z | 21/12/1999 | |