You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.6 KiB

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