summaryrefslogtreecommitdiff
path: root/date-fns/src/locale/hy/_lib
diff options
context:
space:
mode:
Diffstat (limited to 'date-fns/src/locale/hy/_lib')
-rw-r--r--date-fns/src/locale/hy/_lib/formatDistance/index.js101
-rw-r--r--date-fns/src/locale/hy/_lib/formatLong/index.js36
-rw-r--r--date-fns/src/locale/hy/_lib/formatRelative/index.js12
-rw-r--r--date-fns/src/locale/hy/_lib/localize/index.js179
-rw-r--r--date-fns/src/locale/hy/_lib/match/index.js139
5 files changed, 467 insertions, 0 deletions
diff --git a/date-fns/src/locale/hy/_lib/formatDistance/index.js b/date-fns/src/locale/hy/_lib/formatDistance/index.js
new file mode 100644
index 0000000..1a13041
--- /dev/null
+++ b/date-fns/src/locale/hy/_lib/formatDistance/index.js
@@ -0,0 +1,101 @@
+var formatDistanceLocale = {
+ lessThanXSeconds: {
+ one: 'ավելի քիչ քան 1 վայրկյան',
+ other: 'ավելի քիչ քան {{count}} վայրկյան'
+ },
+
+ xSeconds: {
+ one: '1 վայրկյան',
+ other: '{{count}} վայրկյան'
+ },
+
+ halfAMinute: 'կես րոպե',
+
+ lessThanXMinutes: {
+ one: 'ավելի քիչ քան 1 րոպե',
+ other: 'ավելի քիչ քան {{count}} րոպե'
+ },
+
+ xMinutes: {
+ one: '1 րոպե',
+ other: '{{count}} րոպե'
+ },
+
+ aboutXHours: {
+ one: 'մոտ 1 ժամ',
+ other: 'մոտ {{count}} ժամ'
+ },
+
+ xHours: {
+ one: '1 ժամ',
+ other: '{{count}} ժամ'
+ },
+
+ xDays: {
+ one: '1 օր',
+ other: '{{count}} օր'
+ },
+
+ aboutXWeeks: {
+ one: 'մոտ 1 շաբաթ',
+ other: 'մոտ {{count}} շաբաթ'
+ },
+
+ xWeeks: {
+ one: '1 շաբաթ',
+ other: '{{count}} շաբաթ'
+ },
+
+ aboutXMonths: {
+ one: 'մոտ 1 ամիս',
+ other: 'մոտ {{count}} ամիս'
+ },
+
+ xMonths: {
+ one: '1 ամիս',
+ other: '{{count}} ամիս'
+ },
+
+ aboutXYears: {
+ one: 'մոտ 1 տարի',
+ other: 'մոտ {{count}} տարի'
+ },
+
+ xYears: {
+ one: '1 տարի',
+ other: '{{count}} տարի'
+ },
+
+ overXYears: {
+ one: 'ավելի քան 1 տարի',
+ other: 'ավելի քան {{count}} տարի'
+ },
+
+ almostXYears: {
+ one: 'համարյա 1 տարի',
+ other: 'համարյա {{count}} տարի'
+ }
+}
+
+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 + ' հետո'
+ } else {
+ return result + ' առաջ'
+ }
+ }
+
+ return result
+}
diff --git a/date-fns/src/locale/hy/_lib/formatLong/index.js b/date-fns/src/locale/hy/_lib/formatLong/index.js
new file mode 100644
index 0000000..ba7518c
--- /dev/null
+++ b/date-fns/src/locale/hy/_lib/formatLong/index.js
@@ -0,0 +1,36 @@
+import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index'
+
+var dateFormats = {
+ full: 'd MMMM, y, EEEE',
+ long: 'd MMMM, y',
+ medium: 'd MMM, y',
+ short: 'dd.MM.yyyy'
+}
+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/hy/_lib/formatRelative/index.js b/date-fns/src/locale/hy/_lib/formatRelative/index.js
new file mode 100644
index 0000000..60c8bf3
--- /dev/null
+++ b/date-fns/src/locale/hy/_lib/formatRelative/index.js
@@ -0,0 +1,12 @@
+var formatRelativeLocale = {
+ lastWeek: "'նախորդ' eeee p'֊ին'",
+ yesterday: "'երեկ' p'֊ին'",
+ today: "'այսօր' p'֊ին'",
+ tomorrow: "'վաղը' p'֊ին'",
+ nextWeek: "'հաջորդ' eeee p'֊ին'",
+ other: 'P'
+}
+
+export default function formatRelative(token, _date, _baseDate, _options) {
+ return formatRelativeLocale[token]
+}
diff --git a/date-fns/src/locale/hy/_lib/localize/index.js b/date-fns/src/locale/hy/_lib/localize/index.js
new file mode 100644
index 0000000..acd4bbb
--- /dev/null
+++ b/date-fns/src/locale/hy/_lib/localize/index.js
@@ -0,0 +1,179 @@
+import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index'
+
+var eraValues = {
+ narrow: ['Ք', 'Մ'],
+ abbreviated: ['ՔԱ', 'ՄԹ'],
+ wide: ['Քրիստոսից առաջ', 'Մեր թվարկության']
+}
+var quarterValues = {
+ narrow: ['1', '2', '3', '4'],
+ abbreviated: ['Ք1', 'Ք2', 'Ք3', 'Ք4'],
+ wide: ['1֊ին քառորդ', '2֊րդ քառորդ', '3֊րդ քառորդ', '4֊րդ քառորդ']
+}
+var monthValues = {
+ narrow: ['Հ', 'Փ', 'Մ', 'Ա', 'Մ', 'Հ', 'Հ', 'Օ', 'Ս', 'Հ', 'Ն', 'Դ'],
+ abbreviated: [
+ 'հուն',
+ 'փետ',
+ 'մար',
+ 'ապր',
+ 'մայ',
+ 'հուն',
+ 'հուլ',
+ 'օգս',
+ 'սեպ',
+ 'հոկ',
+ 'նոյ',
+ 'դեկ'
+ ],
+ wide: [
+ 'հունվար',
+ 'փետրվար',
+ 'մարտ',
+ 'ապրիլ',
+ 'մայիս',
+ 'հունիս',
+ 'հուլիս',
+ 'օգոստոս',
+ 'սեպտեմբեր',
+ 'հոկտեմբեր',
+ 'նոյեմբեր',
+ 'դեկտեմբեր'
+ ]
+}
+var dayValues = {
+ narrow: ['Կ', 'Ե', 'Ե', 'Չ', 'Հ', 'Ո', 'Շ'],
+ short: ['կր', 'եր', 'եք', 'չք', 'հգ', 'ուր', 'շբ'],
+ abbreviated: ['կիր', 'երկ', 'երք', 'չոր', 'հնգ', 'ուրբ', 'շաբ'],
+ wide: [
+ 'կիրակի',
+ 'երկուշաբթի',
+ 'երեքշաբթի',
+ 'չորեքշաբթի',
+ 'հինգշաբթի',
+ 'ուրբաթ',
+ 'շաբաթ'
+ ]
+}
+var dayPeriodValues = {
+ narrow: {
+ am: 'a',
+ pm: 'p',
+ midnight: 'կեսգշ',
+ noon: 'կեսօր',
+ morning: 'առավոտ',
+ afternoon: 'ցերեկ',
+ evening: 'երեկո',
+ night: 'գիշեր'
+ },
+ abbreviated: {
+ am: 'AM',
+ pm: 'PM',
+ midnight: 'կեսգիշեր',
+ noon: 'կեսօր',
+ morning: 'առավոտ',
+ afternoon: 'ցերեկ',
+ evening: 'երեկո',
+ night: 'գիշեր'
+ },
+ wide: {
+ am: 'a.m.',
+ pm: 'p.m.',
+ midnight: 'կեսգիշեր',
+ noon: 'կեսօր',
+ morning: 'առավոտ',
+ afternoon: 'ցերեկ',
+ evening: 'երեկո',
+ night: 'գիշեր'
+ }
+}
+var formattingDayPeriodValues = {
+ narrow: {
+ am: 'a',
+ pm: 'p',
+ midnight: 'կեսգշ',
+ noon: 'կեսօր',
+ morning: 'առավոտը',
+ afternoon: 'ցերեկը',
+ evening: 'երեկոյան',
+ night: 'գիշերը'
+ },
+ abbreviated: {
+ am: 'AM',
+ pm: 'PM',
+ midnight: 'կեսգիշերին',
+ noon: 'կեսօրին',
+ morning: 'առավոտը',
+ afternoon: 'ցերեկը',
+ evening: 'երեկոյան',
+ night: 'գիշերը'
+ },
+ wide: {
+ am: 'a.m.',
+ pm: 'p.m.',
+ midnight: 'կեսգիշերին',
+ noon: 'կեսօրին',
+ morning: 'առավոտը',
+ afternoon: 'ցերեկը',
+ evening: 'երեկոյան',
+ night: 'գիշերը'
+ }
+}
+
+function ordinalNumber(dirtyNumber, _dirtyOptions) {
+ var number = Number(dirtyNumber) // 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 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',
+ // 'day', 'hour', 'minute', 'second'
+
+ var rem100 = number % 100
+
+ if (rem100 < 10) {
+ if (rem100 % 10 === 1) {
+ return number + '֊ին'
+ }
+ }
+
+ 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/hy/_lib/match/index.js b/date-fns/src/locale/hy/_lib/match/index.js
new file mode 100644
index 0000000..3078402
--- /dev/null
+++ b/date-fns/src/locale/hy/_lib/match/index.js
@@ -0,0 +1,139 @@
+import buildMatchPatternFn from '../../../_lib/buildMatchPatternFn/index'
+import buildMatchFn from '../../../_lib/buildMatchFn/index'
+
+var matchOrdinalNumberPattern = /^(\d+)((-|֊)?(ին|րդ))?/i
+var parseOrdinalNumberPattern = /\d+/i
+
+var matchEraPatterns = {
+ narrow: /^(Ք|Մ)/i,
+ abbreviated: /^(Ք\.?\s?Ա\.?|Մ\.?\s?Թ\.?\s?Ա\.?|Մ\.?\s?Թ\.?|Ք\.?\s?Հ\.?)/i,
+ wide: /^(քրիստոսից առաջ|մեր թվարկությունից առաջ|մեր թվարկության|քրիստոսից հետո)/i
+}
+var parseEraPatterns = {
+ any: [/^(ք|մ)/i]
+}
+
+var matchQuarterPatterns = {
+ narrow: /^[1234]/i,
+ abbreviated: /^ք[1234]/i,
+ wide: /^[1234]((-|֊)?(ին|րդ)) քառորդ/i
+}
+var parseQuarterPatterns = {
+ any: [/1/i, /2/i, /3/i, /4/i]
+}
+
+var matchMonthPatterns = {
+ narrow: /^[հփմաօսնդ]/i,
+ abbreviated: /^(հուն|փետ|մար|ապր|մայ|հուն|հուլ|օգս|սեպ|հոկ|նոյ|դեկ)/i,
+ wide: /^(հունվար|փետրվար|մարտ|ապրիլ|մայիս|հունիս|հուլիս|օգոստոս|սեպտեմբեր|հոկտեմբեր|նոյեմբեր|դեկտեմբեր)/i
+}
+var parseMonthPatterns = {
+ narrow: [
+ /^հ/i,
+ /^փ/i,
+ /^մ/i,
+ /^ա/i,
+ /^մ/i,
+ /^հ/i,
+ /^հ/i,
+ /^օ/i,
+ /^ս/i,
+ /^հ/i,
+ /^ն/i,
+ /^դ/i
+ ],
+ any: [
+ /^հու/i,
+ /^փ/i,
+ /^մար/i,
+ /^ա/i,
+ /^մայ/i,
+ /^հուն/i,
+ /^հուլ/i,
+ /^օ/i,
+ /^ս/i,
+ /^հոկ/i,
+ /^ն/i,
+ /^դ/i
+ ]
+}
+
+var matchDayPatterns = {
+ narrow: /^[եչհոշկ]/i,
+ short: /^(կր|եր|եք|չք|հգ|ուր|շբ)/i,
+ abbreviated: /^(կիր|երկ|երք|չոր|հնգ|ուրբ|շաբ)/i,
+ wide: /^(կիրակի|երկուշաբթի|երեքշաբթի|չորեքշաբթի|հինգշաբթի|ուրբաթ|շաբաթ)/i
+}
+var parseDayPatterns = {
+ narrow: [/^կ/i, /^ե/i, /^ե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
+ short: [/^կ/i, /^եր/i, /^եք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
+ abbreviated: [/^կ/i, /^երկ/i, /^երք/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i],
+ wide: [/^կ/i, /^երկ/i, /^երե/i, /^չ/i, /^հ/i, /^(ո|Ո)/, /^շ/i]
+}
+
+var matchDayPeriodPatterns = {
+ narrow: /^([ap]|կեսգշ|կեսօր|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i,
+ any: /^([ap]\.?\s?m\.?|կեսգիշեր(ին)?|կեսօր(ին)?|(առավոտը?|ցերեկը?|երեկո(յան)?|գիշերը?))/i
+}
+var parseDayPeriodPatterns = {
+ any: {
+ am: /^a/i,
+ pm: /^p/i,
+ midnight: /կեսգիշեր/i,
+ noon: /կեսօր/i,
+ morning: /առավոտ/i,
+ afternoon: /ցերեկ/i,
+ evening: /երեկո/i,
+ night: /գիշեր/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