project files added

This commit is contained in:
mhalfmann
2021-06-15 16:00:08 +02:00
parent e156e2f053
commit db46afa351
13928 changed files with 1569902 additions and 0 deletions
@@ -0,0 +1,77 @@
var formatDistanceLocale = {
lessThanXSeconds: {
one: 'moins dune seconde',
other: 'moins de {{count}} secondes'
},
xSeconds: {
one: '1 seconde',
other: '{{count}} secondes'
},
halfAMinute: '30 secondes',
lessThanXMinutes: {
one: 'moins dune minute',
other: 'moins de {{count}} minutes'
},
xMinutes: {
one: '1 minute',
other: '{{count}} minutes'
},
aboutXHours: {
one: 'environ 1 heure',
other: 'environ {{count}} heures'
},
xHours: {
one: '1 heure',
other: '{{count}} heures'
},
xDays: {
one: '1 jour',
other: '{{count}} jours'
},
aboutXMonths: {
one: 'environ 1 mois',
other: 'environ {{count}} mois'
},
xMonths: {
one: '1 mois',
other: '{{count}} mois'
},
aboutXYears: {
one: 'environ 1 an',
other: 'environ {{count}} ans'
},
xYears: {
one: '1 an',
other: '{{count}} ans'
},
overXYears: {
one: 'plus dun an',
other: 'plus de {{count}} ans'
},
almostXYears: {
one: 'presquun an',
other: 'presque {{count}} ans'
}
};
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 'dans ' + result;
} else {
return 'il y a ' + result;
}
}
return result;
}
@@ -0,0 +1,10 @@
import buildFormatLongFn from '../../../_lib/buildFormatLongFn/index.js';
var formatLong = buildFormatLongFn({
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'DD.MM.YYYY',
LL: 'Do MMMM YYYY',
LLL: 'Do MMMM YYYY HH:mm',
LLLL: 'dddd, Do MMMM YYYY HH:mm'
});
export default formatLong;
@@ -0,0 +1,11 @@
var formatRelativeLocale = {
lastWeek: '[hier] dddd [à] LT',
yesterday: '[hier à] LT',
today: '[aujourdhui à] LT',
tomorrow: '[demain à] LT',
nextWeek: 'dddd [à] LT',
other: 'L'
};
export default function formatRelative(token, _date, _baseDate, _options) {
return formatRelativeLocale[token];
}
@@ -0,0 +1,15 @@
var formatters = {}; // Special case for day of month ordinals in long date format context:
// 1er mars, 2 mars, 3 mars, …
// See https://github.com/date-fns/date-fns/issues/437
var monthsTokens = ['MMM', 'MMMM'];
monthsTokens.forEach(function (monthToken) {
formatters['Do ' + monthToken] = function (date, options) {
var commonFormatters = options.formatters;
var dayOfMonthToken = date.getUTCDate() === 1 ? 'Do' : 'D';
var dayOfMonthFormatter = commonFormatters[dayOfMonthToken];
var monthFormatter = commonFormatters[monthToken];
return dayOfMonthFormatter(date, options) + ' ' + monthFormatter(date, options);
};
});
export default formatters;
@@ -0,0 +1,75 @@
import buildLocalizeFn from '../../../_lib/buildLocalizeFn/index.js';
import buildLocalizeArrayFn from '../../../_lib/buildLocalizeArrayFn/index.js';
var weekdayValues = {
narrow: ['di', 'lu', 'ma', 'me', 'je', 've', 'sa'],
short: ['dim.', 'lun.', 'mar.', 'mer.', 'jeu.', 'ven.', 'sam.'],
long: ['dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi']
};
var monthValues = {
short: ['janv.', 'févr.', 'mars', 'avr.', 'mai', 'juin', 'juill.', 'août', 'sept.', 'oct.', 'nov.', 'déc.'],
long: ['janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', 'octobre', 'novembre', 'décembre']
};
var timeOfDayValues = {
uppercase: ['AM', 'PM'],
lowercase: ['am', 'pm'],
long: ['du matin', 'de laprès-midi', 'du soir']
};
function timeOfDay(dirtyHours, dirtyOptions) {
var hours = Number(dirtyHours);
var options = dirtyOptions || {};
var type = options.type ? String(options.type) : 'long';
if (type === 'uppercase') {
return hours / 12 >= 1 ? timeOfDayValues.uppercase[1] : timeOfDayValues.uppercase[0];
} else if (type === 'lowercase') {
return hours / 12 >= 1 ? timeOfDayValues.lowercase[1] : timeOfDayValues.lowercase[0];
}
if (hours <= 12) {
return timeOfDayValues.long[0];
} else if (hours <= 16) {
return timeOfDayValues.long[1];
} else {
return timeOfDayValues.long[2];
}
}
function masculineOrdinalNumber(number) {
if (number === 1) {
return '1er';
}
return number + 'e';
}
function feminineOrdinalNumber(number) {
if (number === 1) {
return '1re';
}
return number + 'e';
}
function ordinalNumber(dirtyNumber, dirtyOptions) {
var number = Number(dirtyNumber);
var options = dirtyOptions || {};
var unit = options.unit ? String(options.unit) : null;
if (unit === 'isoWeek' || unit === 'week') {
return feminineOrdinalNumber(number);
}
return masculineOrdinalNumber(number);
}
var localize = {
ordinalNumber: ordinalNumber,
weekday: buildLocalizeFn(weekdayValues, 'long'),
weekdays: buildLocalizeArrayFn(weekdayValues, 'long'),
month: buildLocalizeFn(monthValues, 'long'),
months: buildLocalizeArrayFn(monthValues, 'long'),
timeOfDay: timeOfDay,
timesOfDay: buildLocalizeArrayFn(timeOfDayValues, 'long')
};
export default localize;
@@ -0,0 +1,38 @@
import buildMatchFn from '../../../_lib/buildMatchFn/index.js';
import buildParseFn from '../../../_lib/buildParseFn/index.js';
import buildMatchPatternFn from '../../../_lib/buildMatchPatternFn/index.js';
import parseDecimal from '../../../_lib/parseDecimal/index.js';
var matchOrdinalNumbersPattern = /^(\d+)(e|er|ère|ème|ième)?/i;
var matchWeekdaysPatterns = {
narrow: /^(di|lu|ma|me|je|ve|sa)/i,
short: /^(dim|lun|mar|mer|jeu|ven|sam)/i,
long: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
};
var parseWeekdayPatterns = {
any: [/^d/i, /^l/i, /^ma/i, /^me/i, /^j/i, /^v/i, /^s/i]
};
var matchMonthsPatterns = {
short: /^(jan|fév|mar|avr|mai|juin|juil|aoû|sep|oct|nov|déc)/i,
long: /^('janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre')/i
};
var parseMonthPatterns = {
any: [/^ja/i, /^f/i, /^mar/i, /^av/i, /^mai$/i, /^juin/i, /^juil/i, /^ao/i, /^s/i, /^o/i, /^n/i, /^d/i]
};
var matchTimesOfDayPatterns = {
short: /^(am|pm)/i,
long: /^([ap]\.?\s?m\.?)/i
};
var parseTimeOfDayPatterns = {
any: [/^a/i, /^p/i]
};
var match = {
ordinalNumbers: buildMatchPatternFn(matchOrdinalNumbersPattern),
ordinalNumber: parseDecimal,
weekdays: buildMatchFn(matchWeekdaysPatterns, 'long'),
weekday: buildParseFn(parseWeekdayPatterns, 'any'),
months: buildMatchFn(matchMonthsPatterns, 'long'),
month: buildParseFn(parseMonthPatterns, 'any'),
timesOfDay: buildMatchFn(matchTimesOfDayPatterns, 'long'),
timeOfDay: buildParseFn(parseTimeOfDayPatterns, 'any')
};
export default match;
+4
View File
@@ -0,0 +1,4 @@
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
import { frCH } from 'date-fns/locale'
export default frCH
+34
View File
@@ -0,0 +1,34 @@
// import formatDistance from './_lib/formatDistance/index.js'
// import formatLong from './_lib/formatLong/index.js'
// import formatRelative from './_lib/formatRelative/index.js'
// import localize from './_lib/localize/index.js'
// import match from './_lib/match/index.js'
// import formatters from './_lib/formatters/index.js'
// import buildTokensRegExp from '../_lib/buildTokensRegExp/index.js'
/**
* @type {Locale}
* @category Locales
* @summary French locale.
* @language French
* @iso-639-2 fra
* @author Jean Dupouy [@izeau]{@link https://github.com/izeau}
* @author François B [@fbonzon]{@link https://github.com/fbonzon}
* @author Van Vuong Ngo [@vanvuongngo]{@link https://github.com/vanvuongngo}
*/
// var locale = {
// code: 'fr-CH',
// formatDistance: formatDistance,
// formatLong: formatLong,
// formatRelative: formatRelative,
// localize: localize,
// match: match,
// formatters: formatters,
// formattingTokensRegExp: buildTokensRegExp(formatters),
// options: {
// weekStartsOn: 1 /* Monday */,
// firstWeekContainsDate: 4
// }
// }
// export default locale
throw new Error('fr-CH locale is currently unavailable. Please check the progress of converting this locale to v2.0.0 in this issue on Github: TBA');
+33
View File
@@ -0,0 +1,33 @@
// @flow
// This file is generated automatically by `scripts/build/typings.js`. Please, don't change it.
export type Locale = {
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: Object,
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
+4
View File
@@ -0,0 +1,4 @@
{
"sideEffects": false,
"typings": "../../../typings.d.ts"
}