date-fns/locale#nb TypeScript Examples

The following examples show how to use date-fns/locale#nb. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: localize.ts    From frontend with Apache License 2.0 6 votes vote down vote up
export function getLocale(language: string): Locale {
  switch (language) {
    case 'de':
      return de
    case 'en':
      return enUS
    case 'fr':
      return fr
    case 'nb_NO':
      return nb
    case 'tr':
      return tr
    case 'fi':
      return fi
    case 'id':
      return id
    case 'it':
      return it
    case 'pl':
      return pl
    case 'pt_BR':
      return pt
    case 'ru':
      return ru;
    case 'si':
      return enUS; // date-fns has no Sinhala locale
    case 'vi':
      return vi;
    case 'ar':
      return ar;

    default:
      return enUS
  }
}