UNPKG

2.32 kBJavaScriptView Raw
1//! moment.js locale configuration
2//! locale : Romanian [ro]
3//! author : Vlad Gurdiga : https://github.com/gurdiga
4//! author : Valentin Agachi : https://github.com/avaly
5//! author : Emanuel Cepoi : https://github.com/cepem
6
7import moment from '../moment';
8
9function relativeTimeWithPlural(number, withoutSuffix, key) {
10 var format = {
11 ss: 'secunde',
12 mm: 'minute',
13 hh: 'ore',
14 dd: 'zile',
15 ww: 'săptămâni',
16 MM: 'luni',
17 yy: 'ani',
18 },
19 separator = ' ';
20 if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
21 separator = ' de ';
22 }
23 return number + separator + format[key];
24}
25
26export default moment.defineLocale('ro', {
27 months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split(
28 '_'
29 ),
30 monthsShort:
31 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split(
32 '_'
33 ),
34 monthsParseExact: true,
35 weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
36 weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
37 weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
38 longDateFormat: {
39 LT: 'H:mm',
40 LTS: 'H:mm:ss',
41 L: 'DD.MM.YYYY',
42 LL: 'D MMMM YYYY',
43 LLL: 'D MMMM YYYY H:mm',
44 LLLL: 'dddd, D MMMM YYYY H:mm',
45 },
46 calendar: {
47 sameDay: '[azi la] LT',
48 nextDay: '[mâine la] LT',
49 nextWeek: 'dddd [la] LT',
50 lastDay: '[ieri la] LT',
51 lastWeek: '[fosta] dddd [la] LT',
52 sameElse: 'L',
53 },
54 relativeTime: {
55 future: 'peste %s',
56 past: '%s în urmă',
57 s: 'câteva secunde',
58 ss: relativeTimeWithPlural,
59 m: 'un minut',
60 mm: relativeTimeWithPlural,
61 h: 'o oră',
62 hh: relativeTimeWithPlural,
63 d: 'o zi',
64 dd: relativeTimeWithPlural,
65 w: 'o săptămână',
66 ww: relativeTimeWithPlural,
67 M: 'o lună',
68 MM: relativeTimeWithPlural,
69 y: 'un an',
70 yy: relativeTimeWithPlural,
71 },
72 week: {
73 dow: 1, // Monday is the first day of the week.
74 doy: 7, // The week that contains Jan 7th is the first week of the year.
75 },
76});