PageRenderTime 32ms CodeModel.GetById 19ms app.highlight 9ms RepoModel.GetById 2ms app.codeStats 0ms

/node_modules/moment/src/locale/gom-latn.js

https://bitbucket.org/coleman333/smartsite
JavaScript | 114 lines | 107 code | 3 blank | 4 comment | 17 complexity | 952511542a7f304954bf7a972a712a90 MD5 | raw file
  1//! moment.js locale configuration
  2//! locale : Konkani Latin script [gom-latn]
  3//! author : The Discoverer : https://github.com/WikiDiscoverer
  4
  5import moment from '../moment';
  6
  7function processRelativeTime(number, withoutSuffix, key, isFuture) {
  8    var format = {
  9        's': ['thodde secondanim', 'thodde second'],
 10        'ss': [number + ' secondanim', number + ' second'],
 11        'm': ['eka mintan', 'ek minute'],
 12        'mm': [number + ' mintanim', number + ' mintam'],
 13        'h': ['eka horan', 'ek hor'],
 14        'hh': [number + ' horanim', number + ' horam'],
 15        'd': ['eka disan', 'ek dis'],
 16        'dd': [number + ' disanim', number + ' dis'],
 17        'M': ['eka mhoinean', 'ek mhoino'],
 18        'MM': [number + ' mhoineanim', number + ' mhoine'],
 19        'y': ['eka vorsan', 'ek voros'],
 20        'yy': [number + ' vorsanim', number + ' vorsam']
 21    };
 22    return withoutSuffix ? format[key][0] : format[key][1];
 23}
 24
 25export default moment.defineLocale('gom-latn', {
 26    months : 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split('_'),
 27    monthsShort : 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split('_'),
 28    monthsParseExact : true,
 29    weekdays : 'Aitar_Somar_Mongllar_Budvar_Brestar_Sukrar_Son\'var'.split('_'),
 30    weekdaysShort : 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'),
 31    weekdaysMin : 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'),
 32    weekdaysParseExact : true,
 33    longDateFormat : {
 34        LT : 'A h:mm [vazta]',
 35        LTS : 'A h:mm:ss [vazta]',
 36        L : 'DD-MM-YYYY',
 37        LL : 'D MMMM YYYY',
 38        LLL : 'D MMMM YYYY A h:mm [vazta]',
 39        LLLL : 'dddd, MMMM[achea] Do, YYYY, A h:mm [vazta]',
 40        llll: 'ddd, D MMM YYYY, A h:mm [vazta]'
 41    },
 42    calendar : {
 43        sameDay: '[Aiz] LT',
 44        nextDay: '[Faleam] LT',
 45        nextWeek: '[Ieta to] dddd[,] LT',
 46        lastDay: '[Kal] LT',
 47        lastWeek: '[Fatlo] dddd[,] LT',
 48        sameElse: 'L'
 49    },
 50    relativeTime : {
 51        future : '%s',
 52        past : '%s adim',
 53        s : processRelativeTime,
 54        ss : processRelativeTime,
 55        m : processRelativeTime,
 56        mm : processRelativeTime,
 57        h : processRelativeTime,
 58        hh : processRelativeTime,
 59        d : processRelativeTime,
 60        dd : processRelativeTime,
 61        M : processRelativeTime,
 62        MM : processRelativeTime,
 63        y : processRelativeTime,
 64        yy : processRelativeTime
 65    },
 66    dayOfMonthOrdinalParse : /\d{1,2}(er)/,
 67    ordinal : function (number, period) {
 68        switch (period) {
 69            // the ordinal 'er' only applies to day of the month
 70            case 'D':
 71                return number + 'er';
 72            default:
 73            case 'M':
 74            case 'Q':
 75            case 'DDD':
 76            case 'd':
 77            case 'w':
 78            case 'W':
 79                return number;
 80        }
 81    },
 82    week : {
 83        dow : 1, // Monday is the first day of the week.
 84        doy : 4  // The week that contains Jan 4th is the first week of the year.
 85    },
 86    meridiemParse: /rati|sokalli|donparam|sanje/,
 87    meridiemHour : function (hour, meridiem) {
 88        if (hour === 12) {
 89            hour = 0;
 90        }
 91        if (meridiem === 'rati') {
 92            return hour < 4 ? hour : hour + 12;
 93        } else if (meridiem === 'sokalli') {
 94            return hour;
 95        } else if (meridiem === 'donparam') {
 96            return hour > 12 ? hour : hour + 12;
 97        } else if (meridiem === 'sanje') {
 98            return hour + 12;
 99        }
100    },
101    meridiem : function (hour, minute, isLower) {
102        if (hour < 4) {
103            return 'rati';
104        } else if (hour < 12) {
105            return 'sokalli';
106        } else if (hour < 16) {
107            return 'donparam';
108        } else if (hour < 20) {
109            return 'sanje';
110        } else {
111            return 'rati';
112        }
113    }
114});