How to use the @ui-kitten/components.TranslationWidth.SHORT function in @ui-kitten/components

To help you get started, we’ve selected a few @ui-kitten/components 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 akveo / react-native-ui-kitten / src / moment / momentDate.service.ts View on Github external
protected setMomentLocaleData(locale: string) {
    const momentLocaleData = moment.localeData(locale);

    this.localeData = {
      firstDayOfWeek: momentLocaleData.firstDayOfWeek(),
      defaultFormat: momentLocaleData.longDateFormat('L'),
      months: {
        [TranslationWidth.SHORT]: momentLocaleData.monthsShort(),
        [TranslationWidth.LONG]: momentLocaleData.months(),
      },
      days: {
        [TranslationWidth.SHORT]: momentLocaleData.weekdaysShort(),
        [TranslationWidth.LONG]: momentLocaleData.weekdays(),
      },
    };
  }
}
github akveo / react-native-ui-kitten / src / moment / momentDate.service.ts View on Github external
  public getMonthNameByIndex(month: number, style: TranslationWidth = TranslationWidth.SHORT): string {
    return this.localeData.months[style][month];
  }
github akveo / react-native-ui-kitten / src / moment / momentDate.service.ts View on Github external
  public getMonthName(date: Moment, style: TranslationWidth = TranslationWidth.SHORT): string {
    const month: number = this.getMonth(date);

    return this.getMonthNameByIndex(month, style);
  }