angular-locale_da-gl.js 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. 'use strict';
  2. angular.module("ngLocale", [], ["$provide", function ($provide) {
  3. var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
  4. function getDecimals(n) {
  5. n = n + '';
  6. var i = n.indexOf('.');
  7. return (i == -1) ? 0 : n.length - i - 1;
  8. }
  9. function getVF(n, opt_precision) {
  10. var v = opt_precision;
  11. if (undefined === v) {
  12. v = Math.min(getDecimals(n), 3);
  13. }
  14. var base = Math.pow(10, v);
  15. var f = ((n * base) | 0) % base;
  16. return {v: v, f: f};
  17. }
  18. function getWT(v, f) {
  19. if (f === 0) {
  20. return {w: 0, t: 0};
  21. }
  22. while ((f % 10) === 0) {
  23. f /= 10;
  24. v--;
  25. }
  26. return {w: v, t: f};
  27. }
  28. $provide.value("$locale", {
  29. "DATETIME_FORMATS": {
  30. "AMPMS": [
  31. "AM",
  32. "PM"
  33. ],
  34. "DAY": [
  35. "s\u00f8ndag",
  36. "mandag",
  37. "tirsdag",
  38. "onsdag",
  39. "torsdag",
  40. "fredag",
  41. "l\u00f8rdag"
  42. ],
  43. "ERANAMES": [
  44. "f.Kr.",
  45. "e.Kr."
  46. ],
  47. "ERAS": [
  48. "f.Kr.",
  49. "e.Kr."
  50. ],
  51. "FIRSTDAYOFWEEK": 0,
  52. "MONTH": [
  53. "januar",
  54. "februar",
  55. "marts",
  56. "april",
  57. "maj",
  58. "juni",
  59. "juli",
  60. "august",
  61. "september",
  62. "oktober",
  63. "november",
  64. "december"
  65. ],
  66. "SHORTDAY": [
  67. "s\u00f8n.",
  68. "man.",
  69. "tir.",
  70. "ons.",
  71. "tor.",
  72. "fre.",
  73. "l\u00f8r."
  74. ],
  75. "SHORTMONTH": [
  76. "jan.",
  77. "feb.",
  78. "mar.",
  79. "apr.",
  80. "maj",
  81. "jun.",
  82. "jul.",
  83. "aug.",
  84. "sep.",
  85. "okt.",
  86. "nov.",
  87. "dec."
  88. ],
  89. "STANDALONEMONTH": [
  90. "januar",
  91. "februar",
  92. "marts",
  93. "april",
  94. "maj",
  95. "juni",
  96. "juli",
  97. "august",
  98. "september",
  99. "oktober",
  100. "november",
  101. "december"
  102. ],
  103. "WEEKENDRANGE": [
  104. 5,
  105. 6
  106. ],
  107. "fullDate": "EEEE 'den' d. MMMM y",
  108. "longDate": "d. MMMM y",
  109. "medium": "d. MMM y h.mm.ss a",
  110. "mediumDate": "d. MMM y",
  111. "mediumTime": "h.mm.ss a",
  112. "short": "dd/MM/y h.mm a",
  113. "shortDate": "dd/MM/y",
  114. "shortTime": "h.mm a"
  115. },
  116. "NUMBER_FORMATS": {
  117. "CURRENCY_SYM": "kr.",
  118. "DECIMAL_SEP": ",",
  119. "GROUP_SEP": ".",
  120. "PATTERNS": [
  121. {
  122. "gSize": 3,
  123. "lgSize": 3,
  124. "maxFrac": 3,
  125. "minFrac": 0,
  126. "minInt": 1,
  127. "negPre": "-",
  128. "negSuf": "",
  129. "posPre": "",
  130. "posSuf": ""
  131. },
  132. {
  133. "gSize": 3,
  134. "lgSize": 3,
  135. "maxFrac": 2,
  136. "minFrac": 2,
  137. "minInt": 1,
  138. "negPre": "-",
  139. "negSuf": "\u00a0\u00a4",
  140. "posPre": "",
  141. "posSuf": "\u00a0\u00a4"
  142. }
  143. ]
  144. },
  145. "id": "da-gl",
  146. "localeID": "da_GL",
  147. "pluralCat": function (n, opt_precision) {
  148. var i = n | 0;
  149. var vf = getVF(n, opt_precision);
  150. var wt = getWT(vf.v, vf.f);
  151. if (n == 1 || wt.t != 0 && (i == 0 || i == 1)) {
  152. return PLURAL_CATEGORY.ONE;
  153. }
  154. return PLURAL_CATEGORY.OTHER;
  155. }
  156. });
  157. }]);