No Description

ro.js 2.1KB

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