ro.js 2.7 KB

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