ro.js 2.3 KB

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