Node-Red configuration
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.

cy.js 2.8KB

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