9f40cce43b109c2b84b33f35d5b42f5a9146a2984111eed26231fe9a7999d9652ff3b4c79d543541420efc8570cfb597ea786e0e62389ec69801c038ccb164 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. import moment from '../moment';
  6. function relativeTimeWithPlural(number, withoutSuffix, key) {
  7. var format = {
  8. 'mm': 'minute',
  9. 'hh': 'ore',
  10. 'dd': 'zile',
  11. 'MM': 'luni',
  12. 'yy': 'ani'
  13. },
  14. separator = ' ';
  15. if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) {
  16. separator = ' de ';
  17. }
  18. return number + separator + format[key];
  19. }
  20. export default moment.defineLocale('ro', {
  21. months : 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split('_'),
  22. monthsShort : 'ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split('_'),
  23. monthsParseExact: true,
  24. weekdays : 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'),
  25. weekdaysShort : 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'),
  26. weekdaysMin : 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'),
  27. longDateFormat : {
  28. LT : 'H:mm',
  29. LTS : 'H:mm:ss',
  30. L : 'DD.MM.YYYY',
  31. LL : 'D MMMM YYYY',
  32. LLL : 'D MMMM YYYY H:mm',
  33. LLLL : 'dddd, D MMMM YYYY H:mm'
  34. },
  35. calendar : {
  36. sameDay: '[azi la] LT',
  37. nextDay: '[mâine la] LT',
  38. nextWeek: 'dddd [la] LT',
  39. lastDay: '[ieri la] LT',
  40. lastWeek: '[fosta] dddd [la] LT',
  41. sameElse: 'L'
  42. },
  43. relativeTime : {
  44. future : 'peste %s',
  45. past : '%s în urmă',
  46. s : 'câteva secunde',
  47. m : 'un minut',
  48. mm : relativeTimeWithPlural,
  49. h : 'o oră',
  50. hh : relativeTimeWithPlural,
  51. d : 'o zi',
  52. dd : relativeTimeWithPlural,
  53. M : 'o lună',
  54. MM : relativeTimeWithPlural,
  55. y : 'un an',
  56. yy : relativeTimeWithPlural
  57. },
  58. week : {
  59. dow : 1, // Monday is the first day of the week.
  60. doy : 7 // The week that contains Jan 1st is the first week of the year.
  61. }
  62. });