UNPKG

4.21 kBJavaScriptView Raw
1//! moment.js locale configuration
2//! locale : French [fr]
3//! author : John Fischer : https://github.com/jfroffice
4
5;(function (global, factory) {
6 typeof exports === 'object' && typeof module !== 'undefined'
7 && typeof require === 'function' ? factory(require('../moment')) :
8 typeof define === 'function' && define.amd ? define(['../moment'], factory) :
9 factory(global.moment)
10}(this, (function (moment) { 'use strict';
11
12 //! moment.js locale configuration
13
14 var monthsStrictRegex =
15 /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
16 monthsShortStrictRegex =
17 /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,
18 monthsRegex =
19 /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,
20 monthsParse = [
21 /^janv/i,
22 /^févr/i,
23 /^mars/i,
24 /^avr/i,
25 /^mai/i,
26 /^juin/i,
27 /^juil/i,
28 /^août/i,
29 /^sept/i,
30 /^oct/i,
31 /^nov/i,
32 /^déc/i,
33 ];
34
35 var fr = moment.defineLocale('fr', {
36 months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split(
37 '_'
38 ),
39 monthsShort:
40 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split(
41 '_'
42 ),
43 monthsRegex: monthsRegex,
44 monthsShortRegex: monthsRegex,
45 monthsStrictRegex: monthsStrictRegex,
46 monthsShortStrictRegex: monthsShortStrictRegex,
47 monthsParse: monthsParse,
48 longMonthsParse: monthsParse,
49 shortMonthsParse: monthsParse,
50 weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'),
51 weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'),
52 weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'),
53 weekdaysParseExact: true,
54 longDateFormat: {
55 LT: 'HH:mm',
56 LTS: 'HH:mm:ss',
57 L: 'DD/MM/YYYY',
58 LL: 'D MMMM YYYY',
59 LLL: 'D MMMM YYYY HH:mm',
60 LLLL: 'dddd D MMMM YYYY HH:mm',
61 },
62 calendar: {
63 sameDay: '[Aujourd’hui à] LT',
64 nextDay: '[Demain à] LT',
65 nextWeek: 'dddd [à] LT',
66 lastDay: '[Hier à] LT',
67 lastWeek: 'dddd [dernier à] LT',
68 sameElse: 'L',
69 },
70 relativeTime: {
71 future: 'dans %s',
72 past: 'il y a %s',
73 s: 'quelques secondes',
74 ss: '%d secondes',
75 m: 'une minute',
76 mm: '%d minutes',
77 h: 'une heure',
78 hh: '%d heures',
79 d: 'un jour',
80 dd: '%d jours',
81 w: 'une semaine',
82 ww: '%d semaines',
83 M: 'un mois',
84 MM: '%d mois',
85 y: 'un an',
86 yy: '%d ans',
87 },
88 dayOfMonthOrdinalParse: /\d{1,2}(er|)/,
89 ordinal: function (number, period) {
90 switch (period) {
91 // TODO: Return 'e' when day of month > 1. Move this case inside
92 // block for masculine words below.
93 // See https://github.com/moment/moment/issues/3375
94 case 'D':
95 return number + (number === 1 ? 'er' : '');
96
97 // Words with masculine grammatical gender: mois, trimestre, jour
98 default:
99 case 'M':
100 case 'Q':
101 case 'DDD':
102 case 'd':
103 return number + (number === 1 ? 'er' : 'e');
104
105 // Words with feminine grammatical gender: semaine
106 case 'w':
107 case 'W':
108 return number + (number === 1 ? 're' : 'e');
109 }
110 },
111 week: {
112 dow: 1, // Monday is the first day of the week.
113 doy: 4, // The week that contains Jan 4th is the first week of the year.
114 },
115 });
116
117 return fr;
118
119})));