Node-Red configuration
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

cy.js 3.5KB

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