ro.js 2.8 KB

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