From 3e4db6cfcc143a2e1798e6c270eb4274276d518d Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Thu, 8 Aug 2024 10:21:55 +0200 Subject: [PATCH] Add test code for printing date-strings --- src/ATBAPP/ATBDeviceControllerPlugin.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 071cb0f..d6cd74f 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -736,6 +736,19 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHashprinterLocale, parkingEndDateTime.date()); QString currentDateString = TicketUtils::getLocaleDateString(this->printerLocale, currentDateTime.date()); + /******************************************************************************************* + * TEST date formate strings: + QLocale ltLocale("lt_LT"); + QLocale deLocale("de_DE"); + + QString ltShortDate = ltLocale.toString(currentDateTime.date(), QLocale::ShortFormat); + QString deShortDate = deLocale.toString(currentDateTime.date(), QLocale::ShortFormat); + + qCritical() << "*********************************************************************"; + qCritical() << " ltShortDate = " << ltShortDate; + qCritical() << " deShortDate = " << deShortDate; + qCritical() << "*********************************************************************"; + */ /* ----------------------------------------------------------------------------------------- * note: the following highly depends on printer template files!