cy.js 2.8 KB

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