ro.js 2.4 KB

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