8000 Datestimes toFormat('ccc') returns NULL for german language with react native on iOS · Issue #1694 · moment/luxon · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Datestimes toFormat('ccc') returns NULL for german language with react native on iOS #1694
Open
@winie

Description

@winie

Describe the bug

Under react native(iOS), the short formatting of the weekdays (‘ccc’) does not work for the German language.
Android works fine.

To Reproduce

import { DateTime } from 'luxon';

const now = DateTime.now();
const shortWeekday = now.setLocale('de').toFormat('ccc'); // => NULL

Actual vs Expected behavior
It should display the short name of the respective day of the week:

  • Monday -> Mo
  • Tuesday -> Di
  • Wednesday -> Mi
  • Thursday -> Do
  • Friday -> Fr
  • Saturday -> Sa
  • Sunday -> So

Desktop (please complete the following information):

  • OS: iOS 18.3.2
  • Runtime: React Native 0.76 (Expo 52)
  • Luxon: 3.5.9

Additional context

iOS:

Same app android:

Code for tab labels:

const datetime = DateTime.now();
const tabLabel = `${datetime.toFormat('ccc')}, ${datetime.toFormat('dd.LL.')}`;

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0