cy.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // moment.js language configuration
  2. // language : Welsh (cy)
  3. // author : Robert Allen
  4. (function (factory) {
  5. if (typeof define === 'function' && define.amd) {
  6. define(['moment'], factory); // AMD
  7. } else if (typeof exports === 'object') {
  8. module.exports = factory(require('../moment')); // Node
  9. } else {
  10. factory(window.moment); // Browser global
  11. }
  12. }(function (moment) {
  13. return moment.lang("cy", {
  14. months: "Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),
  15. monthsShort: "Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),
  16. weekdays: "Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),
  17. weekdaysShort: "Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),
  18. weekdaysMin: "Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),
  19. // time formats are the same as en-gb
  20. longDateFormat: {
  21. LT: "HH:mm",
  22. L: "DD/MM/YYYY",
  23. LL: "D MMMM YYYY",
  24. LLL: "D MMMM YYYY LT",
  25. LLLL: "dddd, D MMMM YYYY LT"
  26. },
  27. calendar: {
  28. sameDay: '[Heddiw am] LT',
  29. nextDay: '[Yfory am] LT',
  30. nextWeek: 'dddd [am] LT',
  31. lastDay: '[Ddoe am] LT',
  32. lastWeek: 'dddd [diwethaf am] LT',
  33. sameElse: 'L'
  34. },
  35. relativeTime: {
  36. future: "mewn %s",
  37. past: "%s yn ôl",
  38. s: "ychydig eiliadau",
  39. m: "munud",
  40. mm: "%d munud",
  41. h: "awr",
  42. hh: "%d awr",
  43. d: "diwrnod",
  44. dd: "%d diwrnod",
  45. M: "mis",
  46. MM: "%d mis",
  47. y: "blwyddyn",
  48. yy: "%d flynedd"
  49. },
  50. // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
  51. ordinal: function (number) {
  52. var b = number,
  53. output = '',
  54. lookup = [
  55. '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
  56. 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
  57. ];
  58. if (b > 20) {
  59. if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
  60. output = 'fed'; // not 30ain, 70ain or 90ain
  61. } else {
  62. output = 'ain';
  63. }
  64. } else if (b > 0) {
  65. output = lookup[b];
  66. }
  67. return number + output;
  68. },
  69. week : {
  70. dow : 1, // Monday is the first day of the week.
  71. doy : 4 // The week that contains Jan 4th is the first week of the year.
  72. }
  73. });
  74. }));