How to use the dayjs.locale function in dayjs

To help you get started, we’ve selected a few dayjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github BlueWallet / BlueWallet / loc / index.js View on Github external
break;
      case 'nb_no':
        require('dayjs/locale/nb');
        break;
      case 'tr_tr':
        require('dayjs/locale/tr');
        break;
      case 'vi_vn':
        require('dayjs/locale/vi');
        break;
      default:
        localeForDayJSAvailable = false;
        break;
    }
    if (localeForDayJSAvailable) {
      dayjs.locale(lang.split('_')[0]);
    }
  }
})();
github iamkun / dayjs / src / locale / hy-am.js View on Github external
past: '%s առաջ',
    s: 'մի քանի վայրկյան',
    m: 'րոպե',
    mm: '%d րոպե',
    h: 'ժամ',
    hh: '%d ժամ',
    d: 'օր',
    dd: '%d օր',
    M: 'ամիս',
    MM: '%d ամիս',
    y: 'տարի',
    yy: '%d տարի'
  }
}

dayjs.locale(locale, null, true)

export default locale
github iamkun / dayjs / src / locale / fa.js View on Github external
past: '%s پیش',
    s: 'چند ثانیه',
    m: 'یک دقیقه',
    mm: '%d دقیقه',
    h: 'یک ساعت',
    hh: '%d ساعت',
    d: 'یک روز',
    dd: '%d روز',
    M: 'یک ماه',
    MM: '%d ماه',
    y: 'یک سال',
    yy: '%d سال'
  }
}

dayjs.locale(locale, null, true)

export default locale
github iamkun / dayjs / src / locale / ky.js View on Github external
past: '%s мурун',
    s: 'бирнече секунд',
    m: 'бир мүнөт',
    mm: '%d мүнөт',
    h: 'бир саат',
    hh: '%d саат',
    d: 'бир күн',
    dd: '%d күн',
    M: 'бир ай',
    MM: '%d ай',
    y: 'бир жыл',
    yy: '%d жыл'
  }
}

dayjs.locale(locale, null, true)

export default locale
github iamkun / dayjs / src / locale / x-pseudo.js View on Github external
past: '%s á~gó',
    s: 'á ~féw ~sécó~ñds',
    m: 'á ~míñ~úté',
    mm: '%d m~íñú~tés',
    h: 'á~ñ hó~úr',
    hh: '%d h~óúrs',
    d: 'á ~dáý',
    dd: '%d d~áýs',
    M: 'á ~móñ~th',
    MM: '%d m~óñt~hs',
    y: 'á ~ýéár',
    yy: '%d ý~éárs'
  }
}

dayjs.locale(locale, null, true)

export default locale
github iamkun / dayjs / src / locale / az.js View on Github external
s: 'bir neçə saniyə',
    m: 'bir dəqiqə',
    mm: '%d dəqiqə',
    h: 'bir saat',
    hh: '%d saat',
    d: 'bir gün',
    dd: '%d gün',
    M: 'bir ay',
    MM: '%d ay',
    y: 'bir il',
    yy: '%d il'
  },
  ordinal: n => n
}

dayjs.locale(locale, null, true)

export default locale
github iamkun / dayjs / src / locale / tet.js View on Github external
past: '%s liuba',
    s: 'minutu balun',
    m: 'minutu ida',
    mm: 'minutu %d',
    h: 'oras ida',
    hh: 'oras %d',
    d: 'loron ida',
    dd: 'loron %d',
    M: 'fulan ida',
    MM: 'fulan %d',
    y: 'tinan ida',
    yy: 'tinan %d'
  }
}

dayjs.locale(locale, null, true)

export default locale
github iamkun / dayjs / src / locale / ms.js View on Github external
s: 'beberapa saat',
    m: 'seminit',
    mm: '%d minit',
    h: 'sejam',
    hh: '%d jam',
    d: 'sehari',
    dd: '%d hari',
    M: 'sebulan',
    MM: '%d bulan',
    y: 'setahun',
    yy: '%d tahun'
  },
  ordinal: n => `${n}.`
}

dayjs.locale(locale, null, true)

export default locale
github erxes / erxes / src / appContext.tsx View on Github external
        .then(() => dayjs.locale(currentLanguage))
        .catch(_ => dayjs.locale('en'));
github iamkun / dayjs / src / locale / tzm-latn.js View on Github external
past: 'yan %s',
    s: 'imik',
    m: 'minuḍ',
    mm: '%d minuḍ',
    h: 'saɛa',
    hh: '%d tassaɛin',
    d: 'ass',
    dd: '%d ossan',
    M: 'ayowr',
    MM: '%d iyyirn',
    y: 'asgas',
    yy: '%d isgasn'
  }
}

dayjs.locale(locale, null, true)

export default locale

dayjs

2KB immutable date time library alternative to Moment.js with the same modern API

MIT
Latest version published 3 months ago

Package Health Score

88 / 100
Full package analysis