# fix\(ui\): use correct date localization method in QML \(\#591\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/38fc2602664753e4f2e291d77b3d3582600e8391)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: 38fc2602664753e4f2e291d77b3d3582600e8391

Requested commit: 38fc2602664753e4f2e291d77b3d3582600e8391

Commit: 38fc2602664753e4f2e291d77b3d3582600e8391

Tree: 3b6e552314e73ca537fd889fb621effeb9d9f704

Author: Simone

Committer: GitHub

## Message

```
fix(ui): use correct date localization method in QML (#591)

In Qt 6 QML, calling `Qt.locale().toString(date, format)` incorrectly evaluates to `[object Object]`. The correct approach is to call `toLocaleString` directly on the date object. This commit replaces the incorrect bindings in `ShareUsageWindow.qml` and `configGeneral.qml` and updates the corresponding test assertion.

Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: Lucenx9 <185146821+Lucenx9@users.noreply.github.com>
```

## Parents

- [8f70d40804811c9940f96886f2d13cb5cbbcb814](https://git.cafe/lucenx/codexbar-plasma/commit/8f70d40804811c9940f96886f2d13cb5cbbcb814?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/38fc2602664753e4f2e291d77b3d3582600e8391?format=markdown)
