#ifndef TICKETUTILS_H #define TICKETUTILS_H #include class TicketUtils : public QObject { Q_OBJECT public: explicit TicketUtils(QObject *parent = nullptr); /** * @brief getLocaleDateString * @param qLocale * @param qDate * @return a localized date string short format * * Note QLocale::ShortFormat does not result to the * string we need for ticket printing therefore this * helper method was created. * * e.g. using Lithuanian (lt_LT) we get a date in short format: * "2024-08-08" unfortunately this is to long, we need * the year with only two digits. * e.g. in German (de_DE) it is enought: "08.08.24" * */ static QString getLocaleDateString(const QLocale &qLocale, const QDate &qDate); signals: }; #endif // TICKETUTILS_H