ro.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. // moment.js language configuration
  2. // language : romanian (ro)
  3. // author : Vlad Gurdiga : https://github.com/gurdiga
  4. // author : Valentin Agachi : https://github.com/avaly
  5. (function (factory) {
  6. if (typeof define === 'function' && define.amd) {
  7. define(['moment'], factory); // AMD
  8. } else if (typeof exports === 'object') {
  9. module.exports = factory(require('../moment')); // Node
  10. } else {
  11. factory(window.moment); // Browser global
  12. }
  13. }(function (moment) {
  14. function relativeTimeWithPlural(number, withoutSuffix, key) {
  15. var format = {
  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. return moment.lang('ro', {
  29. months : "ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),
  30. monthsShort : "ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),
  31. weekdays : "duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),
  32. weekdaysShort : "Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),
  33. weekdaysMin : "Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),
  34. longDateFormat : {
  35. LT : "H:mm",
  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. m : "un minut",
  54. mm : relativeTimeWithPlural,
  55. h : "o oră",
  56. hh : relativeTimeWithPlural,
  57. d : "o zi",
  58. dd : relativeTimeWithPlural,
  59. M : "o lună",
  60. MM : relativeTimeWithPlural,
  61. y : "un an",
  62. yy : relativeTimeWithPlural
  63. },
  64. week : {
  65. dow : 1, // Monday is the first day of the week.
  66. doy : 7 // The week that contains Jan 1st is the first week of the year.
  67. }
  68. });
  69. }));