QML Javascript Date (localized string) correct in QML live, not when app run 'normally'

I’m not sure what I’m doing wrong. When I’m testing delegates for a ListView in QML live I see:
May 20, for instance using:

headerDate = now.toLocaleString('de-DE', {weekday: 'long', day: 'numeric', month: 'long', year: 'numeric'});
headerDate = headerDate.split(dYear)[0];

This could be done other ways:) In any case, if I turn to running the app outside of SDK context, I get a date like:
5/20/21 9:20 PM … So a raw Date, for all intents and purposes.

(my phone is set to English, timezone Berlin, dual input methods english and german).

What am I overlooking?

Not an expert in the least, but does using the example at https://doc.qt.io/qt-5/qml-qtqml-locale.html change this behaviour?

Also not familiar with how qmllive initializes its environment, but I understand it’s contolled by the QMLLive Bench, not the device environment? At least this help output snipped seems to indicate this:

 qmlliveruntime-sailfish --help
Usage: qmlliveruntime-sailfish [--ipcport PORT] [--workspace WORKSPACE]
       [--no-update-on-connect] [--no-updates-as-overlay]
       [--allow-create-missing] [--load-dummy-data]
       [--print-env | [--] APP [ARGS...]]

<<---SNIP--->>

    --print-env
      Do not execute an APP, only print the environment variables definition
      in a format suitable for sourcing in a shell.

      The way how the libsailfishapp-based application APP is set up to be
      controllable by Qt QmlLive Bench is via the LD_PRELOAD mechanism (see
      ld.so(8)). If it is not possible to use this exec wrapper to start the
      application, it can be set up by defining certain environment variables.

Ok, I found it. It was one toLocaleString() to many and I shouldn’t have been doing any explicit setting (de_DE) anyway. Once I changed the delegate to:

text: model.dailyDate.toLocaleString().split(now.getFullYear())[0];

I got what I want (Friday, May 21, for instance).

I think the explicit toLocaleString might be odd anyway when using qmllive, but I’d need to test that. Keeping it simple works :wink:

PS. I really like qml live. it’s fun. But I’m also really tired :wink: