PageRenderTime 29ms CodeModel.GetById 19ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/moment/locale/cy.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 79 lines | 71 code | 5 blank | 3 comment | 12 complexity | 75fe13326d76dd349dae0379cdf4df99 MD5 | raw file
 1//! moment.js locale configuration
 2
 3;(function (global, factory) {
 4   typeof exports === 'object' && typeof module !== 'undefined'
 5       && typeof require === 'function' ? factory(require('../moment')) :
 6   typeof define === 'function' && define.amd ? define(['../moment'], factory) :
 7   factory(global.moment)
 8}(this, (function (moment) { 'use strict';
 9
10
11    var cy = moment.defineLocale('cy', {
12        months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split('_'),
13        monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split('_'),
14        weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split('_'),
15        weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'),
16        weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'),
17        weekdaysParseExact : true,
18        // time formats are the same as en-gb
19        longDateFormat: {
20            LT: 'HH:mm',
21            LTS : 'HH:mm:ss',
22            L: 'DD/MM/YYYY',
23            LL: 'D MMMM YYYY',
24            LLL: 'D MMMM YYYY HH:mm',
25            LLLL: 'dddd, D MMMM YYYY HH:mm'
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            ss: '%d eiliad',
40            m: 'munud',
41            mm: '%d munud',
42            h: 'awr',
43            hh: '%d awr',
44            d: 'diwrnod',
45            dd: '%d diwrnod',
46            M: 'mis',
47            MM: '%d mis',
48            y: 'blwyddyn',
49            yy: '%d flynedd'
50        },
51        dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,
52        // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
53        ordinal: function (number) {
54            var b = number,
55                output = '',
56                lookup = [
57                    '', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
58                    'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
59                ];
60            if (b > 20) {
61                if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
62                    output = 'fed'; // not 30ain, 70ain or 90ain
63                } else {
64                    output = 'ain';
65                }
66            } else if (b > 0) {
67                output = lookup[b];
68            }
69            return number + output;
70        },
71        week : {
72            dow : 1, // Monday is the first day of the week.
73            doy : 4  // The week that contains Jan 4th is the first week of the year.
74        }
75    });
76
77    return cy;
78
79})));