cscg24-guacamole

CSCG 2024 Challenge 'Guacamole Mashup'
git clone https://git.sinitax.com/sinitax/cscg24-guacamole
Log | Files | Refs | sfeed.txt

tk.js (2488B)


      1//! moment.js locale configuration
      2//! locale : Turkmen [tk]
      3//! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy
      4
      5import moment from '../moment';
      6
      7var suffixes = {
      8    1: "'inji",
      9    5: "'inji",
     10    8: "'inji",
     11    70: "'inji",
     12    80: "'inji",
     13    2: "'nji",
     14    7: "'nji",
     15    20: "'nji",
     16    50: "'nji",
     17    3: "'ünji",
     18    4: "'ünji",
     19    100: "'ünji",
     20    6: "'njy",
     21    9: "'unjy",
     22    10: "'unjy",
     23    30: "'unjy",
     24    60: "'ynjy",
     25    90: "'ynjy",
     26};
     27
     28export default moment.defineLocale('tk', {
     29    months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split(
     30        '_'
     31    ),
     32    monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'),
     33    weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split(
     34        '_'
     35    ),
     36    weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'),
     37    weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'),
     38    longDateFormat: {
     39        LT: 'HH:mm',
     40        LTS: 'HH:mm:ss',
     41        L: 'DD.MM.YYYY',
     42        LL: 'D MMMM YYYY',
     43        LLL: 'D MMMM YYYY HH:mm',
     44        LLLL: 'dddd, D MMMM YYYY HH:mm',
     45    },
     46    calendar: {
     47        sameDay: '[bugün sagat] LT',
     48        nextDay: '[ertir sagat] LT',
     49        nextWeek: '[indiki] dddd [sagat] LT',
     50        lastDay: '[düýn] LT',
     51        lastWeek: '[geçen] dddd [sagat] LT',
     52        sameElse: 'L',
     53    },
     54    relativeTime: {
     55        future: '%s soň',
     56        past: '%s öň',
     57        s: 'birnäçe sekunt',
     58        m: 'bir minut',
     59        mm: '%d minut',
     60        h: 'bir sagat',
     61        hh: '%d sagat',
     62        d: 'bir gün',
     63        dd: '%d gün',
     64        M: 'bir aý',
     65        MM: '%d aý',
     66        y: 'bir ýyl',
     67        yy: '%d ýyl',
     68    },
     69    ordinal: function (number, period) {
     70        switch (period) {
     71            case 'd':
     72            case 'D':
     73            case 'Do':
     74            case 'DD':
     75                return number;
     76            default:
     77                if (number === 0) {
     78                    // special case for zero
     79                    return number + "'unjy";
     80                }
     81                var a = number % 10,
     82                    b = (number % 100) - a,
     83                    c = number >= 100 ? 100 : null;
     84                return number + (suffixes[a] || suffixes[b] || suffixes[c]);
     85        }
     86    },
     87    week: {
     88        dow: 1, // Monday is the first day of the week.
     89        doy: 7, // The week that contains Jan 7th is the first week of the year.
     90    },
     91});