LaravelTest
113 строк · 4.0 Кб
1//! moment.js locale configuration
2//! locale : Cambodian [km]
3//! author : Kruy Vanna : https://github.com/kruyvanna
4
5;(function (global, factory) {6typeof exports === 'object' && typeof module !== 'undefined'7&& typeof require === 'function' ? factory(require('../moment')) :8typeof define === 'function' && define.amd ? define(['../moment'], factory) :9factory(global.moment)10}(this, (function (moment) { 'use strict';11
12//! moment.js locale configuration13
14var symbolMap = {151: '១',162: '២',173: '៣',184: '៤',195: '៥',206: '៦',217: '៧',228: '៨',239: '៩',240: '០',25},26numberMap = {27'១': '1',28'២': '2',29'៣': '3',30'៤': '4',31'៥': '5',32'៦': '6',33'៧': '7',34'៨': '8',35'៩': '9',36'០': '0',37};38
39var km = moment.defineLocale('km', {40months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(41'_'42),43monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split(44'_'45),46weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'),47weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),48weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'),49weekdaysParseExact: true,50longDateFormat: {51LT: 'HH:mm',52LTS: 'HH:mm:ss',53L: 'DD/MM/YYYY',54LL: 'D MMMM YYYY',55LLL: 'D MMMM YYYY HH:mm',56LLLL: 'dddd, D MMMM YYYY HH:mm',57},58meridiemParse: /ព្រឹក|ល្ងាច/,59isPM: function (input) {60return input === 'ល្ងាច';61},62meridiem: function (hour, minute, isLower) {63if (hour < 12) {64return 'ព្រឹក';65} else {66return 'ល្ងាច';67}68},69calendar: {70sameDay: '[ថ្ងៃនេះ ម៉ោង] LT',71nextDay: '[ស្អែក ម៉ោង] LT',72nextWeek: 'dddd [ម៉ោង] LT',73lastDay: '[ម្សិលមិញ ម៉ោង] LT',74lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT',75sameElse: 'L',76},77relativeTime: {78future: '%sទៀត',79past: '%sមុន',80s: 'ប៉ុន្មានវិនាទី',81ss: '%d វិនាទី',82m: 'មួយនាទី',83mm: '%d នាទី',84h: 'មួយម៉ោង',85hh: '%d ម៉ោង',86d: 'មួយថ្ងៃ',87dd: '%d ថ្ងៃ',88M: 'មួយខែ',89MM: '%d ខែ',90y: 'មួយឆ្នាំ',91yy: '%d ឆ្នាំ',92},93dayOfMonthOrdinalParse: /ទី\d{1,2}/,94ordinal: 'ទី%d',95preparse: function (string) {96return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) {97return numberMap[match];98});99},100postformat: function (string) {101return string.replace(/\d/g, function (match) {102return symbolMap[match];103});104},105week: {106dow: 1, // Monday is the first day of the week.107doy: 4, // The week that contains Jan 4th is the first week of the year.108},109});110
111return km;112
113})));114